• Resolved schliflo

    (@schliflo)


    Im running WP 4.4.2 on PHP 7.0.3.

    As soon as i enable eme, i get the following error:
    Warning: session_start() expects parameter 1 to be array, string given in /srv/www/trellis.test/current/web/wp/wp-includes/plugin.php on line 525

    Complete Call stack is:

    ( ! ) Warning: session_start() expects parameter 1 to be array, string given in /srv/www/trellis.test/current/web/wp/wp-includes/plugin.php on line 525
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0006	354288	{main}( )	.../index.php:0
    2	0.0013	356208	require( '/srv/www/trellis.test/current/web/wp/wp-blog-header.php' )	.../index.php:5
    3	0.0022	369368	require_once( '/srv/www/trellis.test/current/web/wp/wp-load.php' )	.../wp-blog-header.php:12
    4	0.0030	371520	require_once( '/srv/www/trellis.test/current/web/wp-config.php' )	.../wp-load.php:42
    5	0.0100	576152	require_once( '/srv/www/trellis.test/current/web/wp/wp-settings.php' )	.../wp-config.php:9
    6	0.3618	29772576	do_action( )	.../wp-settings.php:392
    7	0.3685	29889176	session_start ( )	.../plugin.php:525

    I don’t get this on my production environment, which runs PHP 5.6
    Please evaluate this. If you need any additional information or need to test something out – feel free to ask.
    Thx in advance.

    https://www.ads-software.com/plugins/events-made-easy/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Franky

    (@liedekef)

    I use session_start in 2 places:

    eme_actions.php:
    if (!session_id()) add_action(‘init’, ‘session_start’, 1);

    eme_functions.php:
    if (!isset($_SESSION)) session_start();

    Upon evaluation (because I moved around certain code), the second session_start in eme_functions can be removed (will be never be executed anyway).
    Now the first one is the “wordpress” method of doing things, but it seems it adds a string as a function parameter, while session_start in php 7 now expects an array as optional parameter.

    So, can you try if this works for you:
    https://plugins.trac.www.ads-software.com/changeset/1350894

    Thread Starter schliflo

    (@schliflo)

    seems to work flawlessly so far.

    Thx for the superb plugin and support!

    Plugin Author Franky

    (@liedekef)

    Nice to hear. Can you confirm that it works ok for php 5 too?

    Thread Starter schliflo

    (@schliflo)

    Can confirm that it works on 5.6 as well ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error with PHP7’ is closed to new replies.