Forums

Special Recent Posts
[resolved] php error (8 posts)

  1. zitanix
    Member
    Posted 10 months ago #

    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

  2. Samuel B
    moderator
    Posted 10 months ago #

    rename the \special-recent-posts folder
    this will deactivate plugin and let you log in to test

  3. cslewis1001
    Member
    Posted 9 months ago #

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

  4. lgrandicelli
    Member
    Posted 9 months ago #

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

  5. jrevillini
    Member
    Posted 8 months ago #

    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.

  6. jrevillini
    Member
    Posted 8 months ago #

    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.

  7. jrevillini
    Member
    Posted 3 months ago #

    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!

  8. mystrdat
    Member
    Posted 2 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic