• Resolved Kevin4fm

    (@kevin4fm)


    I’m getting the following error message when I activate Movie Library:

    “Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method PHPPC::register_admin_menu() should not be called statically in C:\Documents and Settings\Kevin\My Documents\My Sites\disc-over.dev\wp-includes\plugin.php on line 496”

    By a process of elimination, I’ve established that the offender causing the message is a plugin called “PHP Code for posts”. This plugin appears to otherwise work without problems, and I only get the error message (continually, on all screens, so it’s difficult to ignore!) when I’ve got Movie Library activated. I’ve tried finding another plugin to replace it which doesn’t give the problem but unsuccessfully. The few that allow PHP operate in such a different way that I doubt I’d be able to adapt the site, at least without considerable revision … my site relies heavily on PHP if clauses, etc.

    Bizarrely, I DON’T get the error message on my online version of the website, only on a local version run using Desk Top Server. In theory, the two sites are identical (except I’m running a few admin type plugins on my development site which I don’t run on the live version, but none of these appear to be involved in the conflict).

    I’d love to use Movie Library … quite heavily probably. It could be a fundamental building block for what I’m trying to achieve. I’ve avoided doing so till now because of this problem. It makes the development site difficult to use and I do all of my work offline and just upload amended files and database.

    Is there, perhaps, a way of just suppressing this message? (I think it’s a warning rather than an actual error.) My live site is at http://www.disc-over.me … though as I say, this isn’t giving a problem and I doubt viewing it would actually be helpful.

    Any thoughts or suggestions very gratefully received.

    Best regards,

    Kevin

    https://wordpress.org/plugins/wpmovielibrary/

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

    That’s indeed an issue with the PHP Code for posts plugin, it’s statically calling non-static methods, triggering a PHP Strict Standard notice.

    You can fix the first one easily by declaring the register_admin_menu() method as static in the plugin’s PHPPostCode.php file (line 258):

    static function register_admin_menu()

    But note that it’ll just trigger other similar notices. There seem to be quite a few identical mistakes in that plugin… You may want to let the dev know about that.

    Thread Starter Kevin4fm

    (@kevin4fm)

    Hi Charlie

    Thank you for such a rapid response!

    I’m not sure ‘PHP Code for Posts’ is still being actively supported, but if it is I’ll let the developer know, as you suggest. I’m pretty sure it hasn’t been updated in ages, so I’ll also try the fix for myself on my local version and see what other messages it then generates, and when.

    If that doesn’t work I’m going to keep looking for an alternative, or seriously consider if I can adapt my site to use one I’ve found that ‘kind of’ works … because ‘WP Movie Library’ seems fantastic and exactly what I need to base my site’s functionality on!

    Many, many thanks. 🙂

    Best regards,

    Kevin.

    You’re welcome, good luck with your project 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin Conflict … Kind of’ is closed to new replies.