mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Drop short array syntax for PHP < 5.4
This commit is contained in:
parent
ddbdf170e6
commit
377aa2aa74
1 changed files with 1 additions and 1 deletions
|
@ -1653,7 +1653,7 @@ class Model extends CakeObject implements CakeEventListener {
|
|||
* @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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue