yiisoft/yii — pull request #2801 by nineinchnick (2013-08-21 19:48:28+00:00)
Title: detect properly if criteria->select starts with a count() expression

Fixes #268. Detect properly if criteria->select starts with a count() expression in CActiveFinder->count() method.

Previously it tested only if the select part of the statement starts with the string 'count'. This could be part of an alias or column name (like 'country'). It should test if count is followed by (spaces and) a left parenthesis.