Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

syntax error in class-wcpbc-admin-notices.php causes 500 error in wp dashboard

$
0
0

Replies: 0

Here is the line from the log:

29711 nightlord.co.uk [Fri May 04 11:39:46 2018] [error] [client 80.41.199.146:51198] AH01215: PHP Parse error: syntax error, unexpected ‘{‘, expecting T_STRING or T_VARIABLE or ‘$’ in /home/sites/nightlord.co.uk/public_html/wp-content/plugins/woocommerce-product-price-based-on-countries/includes/admin/class-wcpbc-admin-notices.php on line 182: /home/sites/nightlord.co.uk/public_html/wp-admin/admin.php

which refers to this section of code:

			if ( method_exists( __CLASS__, $callback) ) {
				self::{$callback}();
			}	

I suspect this may be because I am running PHP 5.6 and this might require PHP 7?

I changed this line to:

eval("self::$callback()");

…which at least has stopped the error but as I’m a novice at debugging other people’s code I’m not entirely sure this is the correct workaround.


Viewing all articles
Browse latest Browse all 59525

Trending Articles