From: <var...@us...> - 2009-06-06 10:07:28
|
Revision: 6903 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6903&view=rev Author: vargenau Date: 2009-06-06 10:07:24 +0000 (Sat, 06 Jun 2009) Log Message: ----------- Avoid "PHP Fatal error" in PHP5: test type Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2009-06-05 10:17:05 UTC (rev 6902) +++ trunk/lib/PageList.php 2009-06-06 10:07:24 UTC (rev 6903) @@ -413,9 +413,9 @@ } $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 @@ 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |