From: <var...@us...> - 2014-12-02 12:51:41
|
Revision: 9399 http://sourceforge.net/p/phpwiki/code/9399 Author: vargenau Date: 2014-12-02 12:51:39 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Use trigger_error, this->error does not exist Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/WikiDB/backend.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-12-01 16:07:25 UTC (rev 9398) +++ trunk/lib/PageList.php 2014-12-02 12:51:39 UTC (rev 9399) @@ -1512,19 +1512,22 @@ if (is_array($limit)) { list($from, $count) = $limit; if ((!empty($from) && !is_numeric($from)) or (!empty($count) && !is_numeric($count))) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return $limit; } if (strstr($limit, ',')) { list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array($from, $limit); } else { if (!empty($limit) && !is_numeric($limit)) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array(0, $limit); } Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-12-01 16:07:25 UTC (rev 9398) +++ trunk/lib/WikiDB/backend.php 2014-12-02 12:51:39 UTC (rev 9399) @@ -553,17 +553,19 @@ * Usage: * list($offset,$count) = $this->limit($args['limit']); */ - function limit($limit) + static function limit($limit) { if (strstr($limit, ',')) { list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array($from, $limit); } else { if (!empty($limit) && !is_numeric($limit)) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array(0, $limit); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |