admin管理员组

文章数量:1406328

I am using a theme plugin that is essential for my theme. It is called
PixGridder Pro. The developer website is down and they can't help me.

The error given by wordress

 Fatal error: Uncaught Error: Using $this when not in object context in /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php:1053 
 Stack trace: #0 /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php(1146): 
 PixGridder::register_options() #1 /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php(94): 
 PixGridder::add_general() #2 /home/#####/public_html/wp-includes/class-wp-hook.php(286): 
 PixGridder::activate('') #3 /home/#####/public_html/wp-includes/class-wp-hook.php(310): 
 WP_Hook->apply_filters('', Array) #4 /home/#####/public_html/wp-includes/plugin.php(465): 
 WP_Hook->do_action(Array) #5 /home/#####/public_html/wp-admin/plugins.php(177): 
 do_action('activate_pixgri...') #6 {main} thrown in /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php on line 1053

the first fatal error line 1053 is :

self::pixgridder_admin( array( &$this, 'register_options' ) );

Stack trace #0 line 1146 is :

self::register_options();

Stack trace #1 line 94 is :

self::add_general();

Can you tell what how to upgrade the plugin so my site work.

It use to work fine maybe there is a way to force the plugin to be active (because it use to be active and work perfectly fine, I just deactivate it for some unrelated thing and now I can't reactivate it)

thanks for your help.

I am using a theme plugin that is essential for my theme. It is called
PixGridder Pro. The developer website is down and they can't help me.

The error given by wordress

 Fatal error: Uncaught Error: Using $this when not in object context in /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php:1053 
 Stack trace: #0 /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php(1146): 
 PixGridder::register_options() #1 /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php(94): 
 PixGridder::add_general() #2 /home/#####/public_html/wp-includes/class-wp-hook.php(286): 
 PixGridder::activate('') #3 /home/#####/public_html/wp-includes/class-wp-hook.php(310): 
 WP_Hook->apply_filters('', Array) #4 /home/#####/public_html/wp-includes/plugin.php(465): 
 WP_Hook->do_action(Array) #5 /home/#####/public_html/wp-admin/plugins.php(177): 
 do_action('activate_pixgri...') #6 {main} thrown in /home/#####/public_html/wp-content/plugins/pixgridder-pro/lib/functions.php on line 1053

the first fatal error line 1053 is :

self::pixgridder_admin( array( &$this, 'register_options' ) );

Stack trace #0 line 1146 is :

self::register_options();

Stack trace #1 line 94 is :

self::add_general();

Can you tell what how to upgrade the plugin so my site work.

It use to work fine maybe there is a way to force the plugin to be active (because it use to be active and work perfectly fine, I just deactivate it for some unrelated thing and now I can't reactivate it)

thanks for your help.

Share Improve this question asked Oct 23, 2019 at 9:07 15eme Doctor15eme Doctor 1232 silver badges7 bronze badges 1
  • Sorry, but with the given information it is impossible to help you. Check this answer on SO for info about the error. Especially one comment saying "You cannot use $this in a static method." – kero Commented Oct 23, 2019 at 9:20
Add a comment  | 

1 Answer 1

Reset to default 0

I found the the solution and everything works now

I just removed: &$this,

giving :

self::pixgridder_admin( array( 'register_options' ) );

本文标签: plugin developmentFatal error Uncaught Error Using this when not in object context