Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    exact the same problem over here.

    Cheers

    Hi,

    I’m not sure if either of you are still having this issue, but I have a couple of solutions for you to try.

    There is a function in this plugin that relies on array dereferencing, This is a function that was introduced in PHP 5.4. Your best way to fix this is to contact your hosting provider and ask them to upgrade your servers version of PHP to at least 5.4.

    If you are unable to do that, or your hosting provider will not let you, then unfortunately you will need to modify the core plugin files, which normally isn’t recommended.

    In the plugin there will be a file called ‘wp-infinite-scrolling.php’. On line 23 there will be the below function:

    function wpifs_option( $key ) {
      return get_option( "wpifs_{$key}", wpifs_defaults()[$key] );
    }

    This is where the issue is, the way the get_option array is written is perfect and will work for PHP versions of 5.4 and higher. However if you want this to work with older versions of PHP (and newer ones for that matter) then you will need to change it to the below:

    function wpifs_option( $key ) {
      return get_option( "wpifs_{$key}", wpifs_defaults($key) );
    }

    Hope that helps!

    Thx for the workarounds HappyKite,
    I’ll try it when I need it in another installation and will give feedback.

    Cheers

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error on activation the plugin’ is closed to new replies.