Page MenuHomeIn-Portal Phabricator

D398.id1056.diff
No OneTemporary

File Metadata

Created
Wed, Feb 26, 8:58 AM

D398.id1056.diff

Index: branches/5.2.x/core/kernel/utility/validator.php
===================================================================
--- branches/5.2.x/core/kernel/utility/validator.php
+++ branches/5.2.x/core/kernel/utility/validator.php
@@ -114,12 +114,26 @@
$item_info[] = key($title_info) . ': <strong>' . current($title_info) . '</strong>';
}
- $error_msg = ' Validation failed in prefix - <strong>' . $this->dataSource->Prefix . '</strong> (' . implode('; ', $item_info) . '),
- FieldErrors follow (look at items with <strong>"pseudo"</strong> key set)<br />
- You may ignore this notice if submitted data really has a validation error';
- trigger_error(trim($error_msg), E_USER_NOTICE);
+ $item_info[] = 'Temp Mode: <strong>' . ($this->dataSource->IsTempTable() ? 'Yes' : 'No') . '</strong>';
+
+ $raw_errors = array_filter($this->FieldErrors, function ($error_params) {
+ return isset($error_params['pseudo']);
+ });
+
+ $error_msg = <<<HTML
+Validation failed for <strong>%s</strong> item (%s).<br/>
+<strong>Validation errors:</strong><br/>
+<pre>%s</pre>
+You may ignore this notice if submitted data really has a validation error.
+HTML;
+ $error_msg = sprintf(
+ $error_msg,
+ $this->dataSource->getPrefixSpecial(),
+ implode('; ', $item_info),
+ print_r($raw_errors, true)
+ );
- $this->Application->Debugger->dumpVars($this->FieldErrors);
+ trigger_error(trim($error_msg), E_USER_NOTICE);
}
return $global_res;

Event Timeline