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

  1. zitanix
    Posted 4 years 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
    Posted 4 years ago #

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

  3. cslewis1001
    Posted 4 years ago #

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

  4. Luca Grandicelli
    Plugin Author

    Posted 4 years ago #

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

  5. James Revillini
    Posted 3 years 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. James Revillini
    Posted 3 years 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. James Revillini
    Posted 3 years 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? :)


  8. mystrdat
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Special Recent Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic