Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING [closed]

Tags:

php

wordpress

I get this error:

"Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in [wordpress dir]/wp-content/themes/[my-theme]/functions.php on line 14"

And line 14 is just a simple use command...

Line 13-15:

add_action('headway_setup_child_theme', array('HeadwaySchematic', 'init'), 1);
use mfbcaptheme\mobilebrowsertheme;
require_once 'mobilebrowsertheme.php';

This is on a client's site and it works just fine on my test site....Not sure what would cause this error.

like image 211
Greg Avatar asked Dec 19 '12 20:12

Greg


1 Answers

Make sure they are running PHP 5.3 or later. If they are running an earlier version they won't have support for namespaces.

like image 185
John Conde Avatar answered Sep 19 '22 17:09

John Conde