• Resolved ygirod

    (@ygirod)


    Hi,

    Since last update I Have this error.

    Warning: array_merge(): Expected parameter 1 to be an array, null given in …/wp-content/themes/chaplin/parts/template-tags.php on line 386

    Warning: array_values() expects parameter 1 to be array, null given in …/wp-content/themes/chaplin/parts/template-tags.php on line 386

    Error disappear on selecting any “Top Post Meta” options (firts I slected nothing).

    Any idea ?

    Thanks and best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ygirod

    (@ygirod)

    My temporary solution is to add

    if ( $post_meta && ! in_array( 'empty', $post_meta ) ) :

    and

    endif;

    around

    // Reassign the reordered post meta with custom post meta items appended, and update the indexes
    $post_meta = array_values( array_merge( $post_meta_reordered, $post_meta_custom ) );
    • This reply was modified 4 years, 6 months ago by ygirod.
    Theme Author Anders Norén

    (@anlino)

    Hi @ygirod,

    Sorry about that, and thanks for posting about the bug – it seems my version of PHP was a bit forgiving with the warnings. This should be fixed in version 2.4.1, which should hopefully be live within the hour.

    I’d much appreciate it if you confirm whether the fix works once the update is live.

    — Anders

    • This reply was modified 4 years, 6 months ago by Anders Norén.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning → template-tags.php on line 386’ is closed to new replies.