From f764598b708a4388c45e37abac3b4edfca38453d Mon Sep 17 00:00:00 2001 From: vargenau Date: Sat, 6 Jun 2009 10:07:24 +0000 Subject: [PATCH] Avoid "PHP Fatal error" in PHP5: test type git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@6903 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/PageList.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PageList.php b/lib/PageList.php index cef41e32e..7e48be386 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -413,9 +413,9 @@ class _PageList_Column_content extends _PageList_Column { } $search = $this->search; $score = ''; - if (!empty($page_handle->score)) + if (is_object($page_handle) and !empty($page_handle->score)) $score = $page_handle->score; - elseif (!empty($page_handle['score'])) + elseif (is_array($page_handle) and !empty($page_handle['score'])) $score = $page_handle['score']; if ($search and ($i = strpos(strtolower($c), strtolower($search))) !== false) { $l = strlen($search); @@ -448,9 +448,9 @@ class _PageList_Column_content extends _PageList_Column { ByteFormatter($len, /*$longformat = */true)); } function _getSortableValue ($page_handle, &$revision_handle) { - if (!empty($page_handle->score)) + if (is_object($page_handle) and !empty($page_handle->score)) return $page_handle->score; - elseif (!empty($page_handle['score'])) + elseif (is_array($page_handle) and !empty($page_handle['score'])) return $page_handle['score']; else return substr(_PageList_Column::_getValue($page_handle, $revision_handle),0,50); -- 2.45.0