Skip to content

Commit 9105c12

Browse files
committed
PHP compat: allowed classes are required as a 2nd argument
1 parent 2873903 commit 9105c12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controller/search.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ protected function assign_doc_vars($documents)
525525
*/
526526
protected function get_document_url($type, $params)
527527
{
528-
$params = unserialize($params);
528+
$params = unserialize($params, ['allowed_classes' => false]);
529529

530530
switch ($type)
531531
{
@@ -660,7 +660,7 @@ protected function get_posts(array $ids, array $documents, bool $is_sphinx)
660660
while ($row = $this->db->sql_fetchrow($result))
661661
{
662662
$id = $row['post_type'] . '_' . ($is_sphinx ? $row['id'] + 20000000 : $row['id']);
663-
$row['url'] = serialize(array_merge(unserialize($row['url']), array(
663+
$row['url'] = serialize(array_merge(unserialize($row['url'], ['allowed_classes' => false]), array(
664664
'topic_id' => $row['topic_id'],
665665
'p' => $row['id'],
666666
'#' => 'p' . $row['id'],

0 commit comments

Comments
 (0)