Plugin can't activate: unexpected T_STRING error
-
Hi there,
We’d really like to use your Simply Static plugin on our site. But when we try to activate the plugin, we get the following error message:
“Plugin could not be activated because it triggered a fatal error.
“Parse error: syntax error, unexpected T_STRING in …/plugins/simply-static/includes/libraries/PhpSimple/HtmlDomParser.php on line 3.”
This is the code in the mentioned file, with namespace Sunra\PhpSimple; being on line 3.
<?php namespace Sunra\PhpSimple; require 'simplehtmldom_1_5'.DIRECTORY_SEPARATOR.'simple_html_dom.php'; class HtmlDomParser { /** * @return \simplehtmldom_1_5\simple_html_dom */ static public function file_get_html() { return call_user_func_array ( '\simplehtmldom_1_5\file_get_html' , func_get_args() ); } /** * get html dom from string * @return \simplehtmldom_1_5\simple_html_dom */ static public function str_get_html() { return call_user_func_array ( '\simplehtmldom_1_5\str_get_html' , func_get_args() ); } }We deactivated our other plugins to rule out any plugin conflict issues. We also deactivated our theme and tested the plugin with the Twenty Sixteen theme, but we still got the same error.
We were wondering if anyone has ever reported a similar issue, as we’d really appreciate it if you give us any advice on how to fix the problem?
Thanks
The topic ‘Plugin can't activate: unexpected T_STRING error’ is closed to new replies.