diff options
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r-- | engine/lib/metadata.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 57987107c..ca127c386 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -739,6 +739,8 @@ */ function clear_metadata_by_owner($owner_guid) { + global $CONFIG; + $owner_guid = (int)$owner_guid; $metas = get_data("SELECT id from {$CONFIG->dbprefix}metadata WHERE owner_guid=$owner_guid"); @@ -746,7 +748,7 @@ foreach ($metas as $id) { - if (delete_metadata($id)) // Is this the best way? + if (delete_metadata($id->id)) // Is this the best way? $deleted++; } |