Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1098702
D167.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 14, 4:45 AM
Size
757 B
Mime Type
text/x-diff
Expires
Fri, Aug 15, 4:45 AM (6 h, 54 m)
Engine
blob
Format
Raw Data
Handle
711416
Attached To
D167: INP-1514 Reset validation errors before object loading
D167.diff
View Options
Index: branches/5.2.x/core/kernel/db/dbitem.php
===================================================================
--- branches/5.2.x/core/kernel/db/dbitem.php
+++ branches/5.2.x/core/kernel/db/dbitem.php
@@ -401,6 +401,8 @@
*/
public function Load($id, $id_field_name = null, $cachable = false)
{
+ $this->Clear();
+
if ( isset($id_field_name) ) {
$this->IDField = $id_field_name; // set new IDField
}
@@ -420,7 +422,7 @@
}
if (($id === false) || !$keys_sql) {
- return $this->Clear();
+ return false;
}
if (!$this->raiseEvent('OnBeforeItemLoad', $id)) {
@@ -453,7 +455,7 @@
$this->Loaded = true;
}
else {
- return $this->Clear();
+ return false;
}
if (is_array($id) || isset($id_field_name)) {
Event Timeline
Log In to Comment