Title: Errors when loading
Last modified: August 31, 2016

---

# Errors when loading

 *  Resolved [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/errors-when-loading/)
 * Hey this looks like it will be a great plugin
 * I get an error after activation
 * Notice: Undefined variable: this in /www/sites/e12/ee6/gos.rewweb.co.uk/web/wp-
   content/plugins/bbp-mentions-email-notifications/index.php on line 55
 * and when I try and access settings I get :
 * Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not
   be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts,
   or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information.(
   This message was added in version 3.3.) in /www/sites/e12/ee6/gos.rewweb.co.uk/
   web/wp-includes/functions.php on line 3792
 * Notice: Undefined variable: this in /www/sites/e12/ee6/gos.rewweb.co.uk/web/wp-
   content/plugins/bbp-mentions-email-notifications/index.php on line 55
 * Warning: call_user_func_array() expects parameter 1 to be a valid callback, first
   array member is not a valid class name or object in /www/sites/e12/ee6/gos.rewweb.
   co.uk/web/wp-includes/plugin.php on line 525
 * and a blank screen.
 * [https://wordpress.org/plugins/bbp-mentions-email-notifications/](https://wordpress.org/plugins/bbp-mentions-email-notifications/)

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

 *  anonymized-13749270
 * (@anonymized-13749270)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118169)
 * Hi Robin,
 * Hope you are doing well.
 * I am suspecting that your PHP version is something less than the recommended 
   for WordPress so this error is triggered but, not going through this, can you
   please go to line:55 and add `&` before `$this` variable?
 * `array( &$this, 'bbpen_settings' )` let me know if it worked, else I can put 
   the plugin file in a different syntax so it simply works without OOP..
 * Thanks and have a wonderful weekend.
 * Samuel
 *  Thread Starter [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118177)
 * > array( &$this, ‘bbpen_settings’ ) let me know if it worked
 * yes that worked.
 * and yes I was at an old version of php testing for a client, now reverted back
   to 5.6 and all is fine
 * Thanks
 *  anonymized-13749270
 * (@anonymized-13749270)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118179)
 * Thanks for letting me know Robin! I will be updating soon.
 * Have a nice day.
 * Samuel
 *  [jeromias](https://wordpress.org/support/users/jeromias/)
 * (@jeromias)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118228)
 * Hi Samuel,
 * I have the same (similar) problem, where the settings page goes blank.
    I could
   figure out that it happens at the same spot (line 55), but the reference with
   ampersand (&$this) didn’t help. When testing on my localhost, it works.
 * Localhost: PHP Version 5.5.9-1ubuntu4.16
    Online: Version 5.3.3
 * The only errors/warnings I see on the online are :
    `PHP Warning: call_user_func_array()
   expects parameter 1 to be a valid callback, first array member is not a valid
   class name or object in /var/www/vhosts/photosynthesis.org.au/httpdocs/wp-includes/
   plugin.php on line 525` .. which I have to guess comes from this page.
 * Any idea what else I could try?
 * thanks for help,
    Jerome
 *  [jeromias](https://wordpress.org/support/users/jeromias/)
 * (@jeromias)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118229)
 * … sorry, using wordpress 4.5.1 on both platforms 🙂
 *  [jeromias](https://wordpress.org/support/users/jeromias/)
 * (@jeromias)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118230)
 * Hi Samuel,
 * I made some more tests and realise that the issue appears before this line.
    
   In the __construct() method, the program breaks at line 42, when it says: `$this-
   >settings['format'] = get_option('bbpen_format')...`
 * – I’ve tried to wrap the conditional in brackets, but didn’t help.
    – If I remove
   the conditional and just add a string, then it works (or at least goes to the
   next line) – I’ve seen now an error that tells me a bit more: Call to undefined
   function get_option()
 * Trying now to get the function to be recognised…
 * thanks if any ideas
    Jerome
 *  [jeromias](https://wordpress.org/support/users/jeromias/)
 * (@jeromias)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118231)
 * Hi Samuel,
 * sorry for all the confusion above, this was an unrelated problem.
    The issue 
   remains like I’ve described it first though: The program passes the line: `add_options_page('
   bbPress Mentions Email Notifications', 'bbP mentions', 'manage_options', 'bbpmen',
   array( $this, 'bbpen_settings' ) );` … but the method `bbpen_settings` is not
   called..
 * Thanks for help,
    Jerome
 *  anonymized-13749270
 * (@anonymized-13749270)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118232)
 * Hello [@jeromias](https://wordpress.org/support/users/jeromias/),
 * As per the [forum welcome](https://codex.wordpress.org/Forum_Welcome), you should
   be creating your own thread and not bump Mr Robin’s thread 😉
 * The problem clearly is with your PHP version, you should upgrade to 5.5.* or 
   [5.6 >](https://wordpress.org/about/requirements/) and you will not see these
   errors again.
 * If you can not upgrade or you don’t want to, I will be happy if you [open your own topic](https://wordpress.org/support/plugin/bbp-mentions-email-notifications#topic)
   and I will edit the plugin file for you to make it work with your outdated EOL
   version.
 * Thank you.
    Samuel
 *  [jeromias](https://wordpress.org/support/users/jeromias/)
 * (@jeromias)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118233)
 * Hi Samuel,
 * Thank you for your prompt reply and sorry, Samuel and Robin, for jumping into
   this thread. Will not happen again 🙂
 * I will come back to you when I have decided on upgrade or not.
 * Thanks again.
    Jerome

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

The topic ‘Errors when loading’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bbp-mentions-email-notifications.
   svg)
 * [bbPress Mentions Email Notifications](https://wordpress.org/plugins/bbp-mentions-email-notifications/)
 * [Support Threads](https://wordpress.org/support/plugin/bbp-mentions-email-notifications/)
 * [Active Topics](https://wordpress.org/support/plugin/bbp-mentions-email-notifications/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbp-mentions-email-notifications/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbp-mentions-email-notifications/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [jeromias](https://wordpress.org/support/users/jeromias/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/errors-when-loading/#post-7118233)
 * Status: resolved