Replies: 0
Hello,
When updating my website from php 5.6 to 7.2 (My wordpress site and extensions are all up to date), I have the following warning :
Warning: session_start() expects parameter 1 to be array, string given in /homepages/1/d240608370/htdocs/www/wp-includes/class-wp-hook.php on line 286
Can anyone help me on this ?
Thank you
The line 286 in class-wp-hook.php is :
$value = call_user_func_array( $the_[‘function’], $args );
This line is part of public function apply_filters( $value, $args ) {
if ( ! $this->callbacks ) {
return $value;
}
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if( ! $this->doing_action ) {
$args[ 0 ] = $value;
}
// Avoid the array_slice if possible.
if ( $the_[‘accepted_args’] == 0 ) {
$value = call_user_func_array( $the_[‘function’], array() );
} elseif ( $the_[‘accepted_args’] >= $num_args ) {
$value = call_user_func_array( $the_[‘function’], $args );
} else {
$value = call_user_func_array( $the_[‘function’], array_slice( $args, 0, (int)$the_[‘accepted_args’] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level–;
return $value;
}
public function apply_filters( $value, $args )