Skip to content

Commit

Permalink
Drop short array syntax for PHP < 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Jun 8, 2017
1 parent ddbdf17 commit 377aa2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Model.php
Expand Up @@ -1653,7 +1653,7 @@ public function read($fields = null, $id = null) {
* @link http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#model-field
*/
public function field($name, $conditions = null, $order = null) {
if ($conditions === null && !in_array($this->id, [false, null], true)) {
if ($conditions === null && !in_array($this->id, array(false, null), true)) {
$conditions = array($this->alias . '.' . $this->primaryKey => $this->id);
}

Expand Down

0 comments on commit 377aa2a

Please sign in to comment.