modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-07-16 23:21:27 +04:00
parent ac94ddc345
commit b94402f927
2 changed files with 3 additions and 2 deletions

View File

@ -233,8 +233,8 @@ class CapacitorChannel {
*
* cette méthode doit être utilisée dans {@link self::onUpdate()}
*/
function wasRowModified(array $values): bool {
return array_key_exists("modified_", $values);
function wasRowModified(array $values, array $pvalues): bool {
return $values["item__sum_"] !== $pvalues["item__sum_"];
}
final function serialize($item): ?string {

View File

@ -139,6 +139,7 @@ class DateTime extends \DateTime {
}
function __construct($datetime="now", DateTimeZone $timezone=null) {
$datetime ??= "now";
if ($datetime instanceof \DateTimeInterface) {
if ($timezone === null) $timezone = $datetime->getTimezone();
parent::__construct();