Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 625c755

Browse files
author
Dale Sikkema
committed
MAGETWO-42973: upgrade ZF1 to 1.12.16
1 parent 7b3b746 commit 625c755

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/Zend/Db/Select.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public function group($spec)
511511
}
512512

513513
foreach ($spec as $val) {
514-
if (preg_match('/\(.*\)/', (string) $val)) {
514+
if (preg_match(self::REGEX_COLUMN_EXPR, (string) $val)) {
515515
$val = new Zend_Db_Expr($val);
516516
}
517517
$this->_parts[self::GROUP][] = $val;
@@ -603,7 +603,7 @@ public function order($spec)
603603
$val = trim($matches[1]);
604604
$direction = $matches[2];
605605
}
606-
if (preg_match('/^[\w]*\(.*\)$/', $val)) {
606+
if (preg_match(self::REGEX_COLUMN_EXPR, $val)) {
607607
$val = new Zend_Db_Expr($val);
608608
}
609609
$this->_parts[self::ORDER][] = array($val, $direction);
@@ -945,7 +945,7 @@ protected function _tableCols($correlationName, $cols, $afterCorrelationName = n
945945
$alias = $m[2];
946946
}
947947
// Check for columns that look like functions and convert to Zend_Db_Expr
948-
if (preg_match('/\(.*\)/', $col)) {
948+
if (preg_match(self::REGEX_COLUMN_EXPR, $col)) {
949949
$col = new Zend_Db_Expr($col);
950950
} elseif (preg_match('/(.+)\.(.+)/', $col, $m)) {
951951
$currentCorrelationName = $m[1];

0 commit comments

Comments
 (0)