We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88f04d7 commit 1eeb9beCopy full SHA for 1eeb9be
runtime/lib/query/ModelCriteria.php
@@ -525,18 +525,18 @@ public function offset($offset)
525
*/
526
public function select($columnArray)
527
{
528
- if (!count($columnArray) || $columnArray == '') {
+ if (empty($columnArray)) {
529
throw new PropelException('You must ask for at least one column');
530
}
531
532
- if ($columnArray == '*') {
+ if (is_string($columnArray) && $columnArray === '*') {
533
$columnArray = array();
534
foreach (call_user_func(array($this->modelPeerName, 'getFieldNames'), BasePeer::TYPE_PHPNAME) as $column) {
535
$columnArray[] = $this->modelName . '.' . $column;
536
537
538
539
- $this->select = $columnArray;
+ $this->select = (array)$columnArray;
540
541
return $this;
542
0 commit comments