Archived
1
0
Fork 0
This repository has been archived on 2026-04-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
httpcb/app/models/Data/Base.php
Henrik Hautakoski dcff1a81b2
app/models/Data/Base.php: override hasChanged()
Phalcon throws an exception if no valid snapshot data is present.

We override this behaviour by treating no
snapshot data (new row) as changed.
2018-08-22 06:06:56 +02:00

26 lines
592 B
PHP

<?php
namespace App\Model\Data;
use Phalcon\Mvc\Model;
class Base extends Model
{
/**
* {@inheritdoc}
*
* Phalcon throws an exception if no valid snapshot data is present.
*
* We override this behaviour by treating no
* snapshot data (new row) as changed.
*
* @param string|array $fieldName
* @param boolean $allFields
* @return bool
*/
public function hasChanged($fieldName = null, $allFields = false)
{
return $this->hasSnapshotData() === false
|| parent::hasChanged($fieldName, $allFields);
}
}