You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2018. It is now read-only.
SELECT `task`.*, `partner`.`name` AS `assigned_to_name`
FROM `task`
LEFT JOIN `partner` ON partner.id = task.assigned_to
WHERE (`task`.`status` = "pending")
ORDER BY `IF(``task```.```urgent``=1,1,0) DESC, ``task```.```created_on``` ASC
LIMIT 20
It should be
SELECT `task`.*, `partner`.`name` AS `assigned_to_name`
FROM `task`
LEFT JOIN `partner` ON partner.id = task.assigned_to
WHERE (`task`.`status` = "pending")
ORDER BY IF(`task`.`urgent`=1,1,0) DESC, `task`.`created_on` ASC
LIMIT 20
My workaround was to change line 604 of Zend_Db_Select back to what it was in 1.12.6 (I'd already made 1.12.7 live before discovering the change)
from this
if (preg_match('/^[\w]*\(.*\)$/', $val)) {
to this
if (preg_match('/\(.*\)/', $val)) {
I realize that this undoes the security fixes of 1.12.7
The text was updated successfully, but these errors were encountered:
joefresco
changed the title
Zend Framework 1.12.7 breaks with functions in the order clause
Zend Framework 1.12.7 breaks functions in the order clause of Zend_Db_Select
Jun 16, 2014
Your SQL statement worked before ZF 1.12.7 because the regular expression was wrong and accepted all kind of string containing parenthesis, see ZF2014-04 for more details.
The following code fails:
The output SQL is:
It should be
My workaround was to change line 604 of Zend_Db_Select back to what it was in 1.12.6 (I'd already made 1.12.7 live before discovering the change)
from this
to this
I realize that this undoes the security fixes of 1.12.7
The text was updated successfully, but these errors were encountered: