Closed siva-farshore closed 10 years ago
It's part of the ValidateableBehavior: https://github.com/milesj/utility/blob/master/Model/Behavior/ValidateableBehavior.php#L140
What versions are you using? What are you doing to cause the error?
I'm using version 5.0.1
I'm getting the following error while post reply to the topics
Database Error Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'invalid' at line 1
SQL Query: invalid
Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp
Stack Trace CORE/Cake/Model/Datasource/DboSource.php line 458 → PDOStatement->execute(array) CORE/Cake/Model/Datasource/DboSource.php line 424 → DboSource->_execute(string, array) CORE/Cake/Model/Datasource/DboSource.php line 665 → DboSource->execute(string, array, array) CORE/Cake/Model/Datasource/DboSource.php line 609 → DboSource->fetchAll(string, array, array) CORE/Cake/Model/Model.php line 800 → DboSource->query(string, array, Post) APP/Plugin/Forum/Model/Post.php line 97 → Model->__call(string, array) APP/Plugin/Forum/Model/Post.php line 97 → Post->invalid(string, string, integer) APP/Plugin/Forum/Controller/PostsController.php line 60 → Post->addPost(array) [internal function] → PostsController->add(string) CORE/Cake/Controller/Controller.php line 490 → ReflectionMethod->invokeArgs(PostsController, array) CORE/Cake/Routing/Dispatcher.php line 185 → Controller->invokeAction(CakeRequest) CORE/Cake/Routing/Dispatcher.php line 160 → Dispatcher->_invoke(PostsController, CakeRequest, CakeResponse) APP/webroot/index.php line 108 → Dispatcher->dispatch(CakeRequest, CakeResponse)
You need to upgrade to 5.0.3 as this bug was fixed in 5.0.2.
In all model, there is a line $this->invalid(....
but I have not found that function anywhere in the class. This cause a fatal error.
Thanks