Page MenuHomeIn-Portal Phabricator

D386.id936.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 3:22 AM

D386.id936.diff

Index: core/kernel/db/dbitem.php
===================================================================
--- core/kernel/db/dbitem.php
+++ core/kernel/db/dbitem.php
@@ -732,7 +732,25 @@
$sql = '';
- $set_fields = isset($update_fields) ? $update_fields : array_keys($this->FieldValues);
+ if ( isset($update_fields) ) {
+ $set_fields = $update_fields;
+ $forgotten_fields = array_diff(array_keys($this->GetChangedFields()), $set_fields);
+
+ if ( $forgotten_fields ) {
+ trigger_error(
+ sprintf(
+ 'These fields weren\'t updated for #%s record in "%s" unit: %s',
+ $this->GetID(),
+ $this->getPrefixSpecial(),
+ implode(', ', $forgotten_fields)
+ ),
+ E_USER_WARNING
+ );
+ }
+ }
+ else {
+ $set_fields = array_keys($this->FieldValues);
+ }
foreach ($set_fields as $field_name) {
if ( $this->skipField($field_name) ) {

Event Timeline