diff --git a/module/VuFind/src/VuFind/Db/Row/Search.php b/module/VuFind/src/VuFind/Db/Row/Search.php index 718035c5c6786c263714f5fac6e113c182442ce4..f7f7451b96fba164f93f2180691310711c230a77 100644 --- a/module/VuFind/src/VuFind/Db/Row/Search.php +++ b/module/VuFind/src/VuFind/Db/Row/Search.php @@ -58,7 +58,11 @@ class Search extends RowGateway // Resource check for PostgreSQL compatibility: $raw = is_resource($this->search_object) ? stream_get_contents($this->search_object) : $this->search_object; - return unserialize($raw); + $result = unserialize($raw); + if (!($result instanceof \VuFind\Search\Minified)) { + throw new \Exception('Problem decoding saved search'); + } + return $result; } /**