hongkildong Posted November 18, 2013 Share Posted November 18, 2013 class QuestionTagTable extends Doctrine_Table { public function getRelatedTags(array $tags, $limit = sfConfig::get('app_tags_on_sidebar')) { } } PHP reports Parse error: syntax error, unexpected '(', expecting ')' on line public function getRelatedTags(array $tags, $limit = sfConfig::get('app_tags_on_sidebar')) Quote Link to comment Share on other sites More sharing options...
Solution Barand Posted November 18, 2013 Solution Share Posted November 18, 2013 Check out default arguments in the manual The default value must be a constant expression, not (for example) a variable, a class member or a function call. http://www.php.net/manual/en/functions.arguments.php#functions.arguments.default Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.