Permalink
Browse files

Bug in backup_getid cause return record when no record

must be returned. Solved.
  • Loading branch information...
1 parent 6e0470a commit 783ab2b07cd9717b4cbfa2f23c99d4c108aa4a6e stronk7 committed Jun 23, 2003
Showing with 7 additions and 4 deletions.
  1. +7 −4 backup/lib.php
View
@@ -414,10 +414,13 @@ function backup_getid ($backup_unique_code, $table, $old_id) {
$status = false;
}
} else {
- ////First strip slashes
- $temp = stripslashes($status->info);
- //Now unserialize
- $status->info = unserialize($temp);
+ //Only if status (record exists)
+ if ($status) {
+ ////First strip slashes
+ $temp = stripslashes($status->info);
+ //Now unserialize
+ $status->info = unserialize($temp);
+ }
}
return $status;

0 comments on commit 783ab2b

Please sign in to comment.