Support » Plugin: Special Recent Posts » php error

  • Resolved zitanix

    (@zitanix)


    i have this error

    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\xampp\htdocs\ig\wp-content\plugins\special-recent-posts\classes\class-main.php on line 53

Viewing 7 replies - 1 through 7 (of 7 total)
  • rename the \special-recent-posts folder
    this will deactivate plugin and let you log in to test

    Hey zitanix, I’m getting the exact same error. What was your fix for it, if any? Thanks!

    Plugin Author Luca Grandicelli

    (@lgrandicelli)

    This error only comes out on a XAMPP installation. Still don’t know why. On WAMP everything runs fine.

    For some reason, the code in the class runs first in XAMPP. Either that or it always runs first but LAMP installs have their default error settings turned down.

    I tested by inserting echo statements before the declaration of the $srp_default_widget_values variable and where it is used in the main class.

    OK, this is great … prepare yourself.

    YOUR config.php file doesn’t get loaded at all under XAMPP. So why doesn’t it fail? I imagine that XAMPP has some really wonky bug having to do with include path and order of paths checked. I believe your line require_once('config.php'); does load SOME config file, but I have no idea where it lives? I changed that line to require_once(dirname(__FILE__) . '/config.php'); and it fixed the issue.

    Hi Luca – I noticed 1.9.4 doesn’t include this fix for XAMPP users. I don’t think this fix will break anything for people running Apache and PHP any other way. Can you incorporate for the next minor version so that upgrades don’t break your plugin for us poor XAMPP users? 🙂

    THANKS!

    @jrevillini You are a mastermind, thanks for the fix.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘php error’ is closed to new replies.