I've got a standard model I'm running findFirst()
. When I pass a really weird string:
-102009260052016-818051805180518061806-071808-101810-111811-121812181218121812181218121812-131813-2018051805--710------------------------------18---------------------------------------------------------------234234--------------------------------------13---------------------------------------------------18051805111805--------------------217---------------22---1122--23-----------------18----2-2-------------1------251805--------------------------------------------------1805-1805-6-1805-------1805-----------------------------------------15----------------------160000---301805--------------------------------18061806---------------------------------------------------1806-1806--800800----------------1806-07-----------1234567------1806---------18051806-1805261807------480000300001500015000070000100001000001807--------22---------1805-------------27--------18081809-1808-101809----1809------18091805-1809----------1808-1809-----17123--1-2-3---23--2-2---2412-327-379--1809-----1809-1805-----1809-10------------------------
as the sole argument, I get an exception:
Phalcon\Mvc\Model\Exception: Syntax error, unexpected token LIMIT, near to ' :APL0:', when parsing: SELECT [Model\Student].* FROM [Model\Student] WHERE -1020[string trimmed]----------- LIMIT :APL0: (1089)
As far as I know, the query should resolve to a comparison against the primary key, but it appears the argument is being treated as the entire condition. Is this a bug in Phalcon or me?