cvs: pear /Pager Common.php package.xml /Pager/tests pager_test.php
| From: | Lorenzo Alberton | Date: | Thu, 02 Mar 2006 14:44:49 +0000 |
| Subject: | cvs: pear /Pager Common.php package.xml /Pager/tests pager_test.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38860@lists.php.net to get a copy of this message | ||
quipo Thu Mar 2 14:44:49 2006 UTC
Modified files:
/pear/Pager Common.php package.xml
/pear/Pager/tests pager_test.php
Log:
return empty array instead of FALSE in getPageData() on bad pageID (request #6986)
http://cvs.php.net/viewcvs.cgi/pear/Pager/Common.php?r1=1.48&r2=1.49&diff_format=u
Index: pear/Pager/Common.php
diff -u pear/Pager/Common.php:1.48 pear/Pager/Common.php:1.49
--- pear/Pager/Common.php:1.48 Mon Feb 20 22:20:01 2006
+++ pear/Pager/Common.php Thu Mar 2 14:44:49 2006
@@ -33,7 +33,7 @@
* @author Richard Heyes <richard@phpguru.org>
* @copyright 2003-2006 Lorenzo Alberton, Richard Heyes
* @license http://www.debian.org/misc/bsd.license BSD
License (3 Clause)
- * @version CVS: $Id: Common.php,v 1.48 2006/02/20 22:20:01 quipo Exp $
+ * @version CVS: $Id: Common.php,v 1.49 2006/03/02 14:44:49 quipo Exp $
* @link http://pear.php.net/package/Pager
*/
@@ -426,7 +426,7 @@
if (!empty($this->_pageData[$pageID])) {
return $this->_pageData[$pageID];
}
- return false;
+ return array();
}
// }}}
http://cvs.php.net/viewcvs.cgi/pear/Pager/package.xml?r1=1.64&r2=1.65&diff_format=u
Index: pear/Pager/package.xml
diff -u pear/Pager/package.xml:1.64 pear/Pager/package.xml:1.65
--- pear/Pager/package.xml:1.64 Mon Feb 20 22:44:47 2006
+++ pear/Pager/package.xml Thu Mar 2 14:44:49 2006
@@ -26,13 +26,14 @@
<release>
<version>2.4.0</version>
- <date>2006-02-20</date>
+ <date>2006-03-02</date>
<state>stable</state>
<notes>
<![CDATA[
- added host to CURRENT_PATHNAME constant
- added accesskey option (if true, accesskey attributes are added to the links)
- fixed multibyte string issues with httpMethod==POST (bug #6812)
+- return empty array instead of FALSE in getPageData() on bad pageID (request #6986)
]]>
</notes>
@@ -80,13 +81,14 @@
<changelog>
<release>
<version>2.4.0</version>
- <date>2006-02-20</date>
+ <date>2006-03-02</date>
<state>stable</state>
<notes>
<![CDATA[
- added host to CURRENT_PATHNAME constant
- added accesskey option (if true, accesskey attributes are added to the links)
- fixed multibyte string issues with httpMethod==POST (bug #6812)
+- return empty array instead of FALSE in getPageData() on bad pageID (request #6986)
]]>
</notes>
</release>
http://cvs.php.net/viewcvs.cgi/pear/Pager/tests/pager_test.php?r1=1.16&r2=1.17&diff_format=u
Index: pear/Pager/tests/pager_test.php
diff -u pear/Pager/tests/pager_test.php:1.16 pear/Pager/tests/pager_test.php:1.17
--- pear/Pager/tests/pager_test.php:1.16 Mon Feb 20 22:43:14 2006
+++ pear/Pager/tests/pager_test.php Thu Mar 2 14:44:49 2006
@@ -1,5 +1,5 @@
<?php
-// $Id: pager_test.php,v 1.16 2006/02/20 22:43:14 quipo Exp $
+// $Id: pager_test.php,v 1.17 2006/03/02 14:44:49 quipo Exp $
require_once 'simple_include.php';
require_once 'pager_include.php';
@@ -61,7 +61,7 @@
$this->assertEqual(array(5=>6, 6=>7, 7=>8, 8=>9, 9=>10),
$this->pager->getPageData(2));
}
function testGetPageData_OutOfRange() {
- $this->assertEqual(false, $this->pager->getPageData(3));
+ $this->assertEqual(array(), $this->pager->getPageData(3));
}
function testSelectBox() {
$selectBox = '<select
name="'.$this->pager->_sessionVar.'">';
@@ -500,6 +500,7 @@
//? ?? ??',
'plain4' => 'abcde', //not multibyte
'plain5' => '&#abcfg;', //invalid hex-encoded char
+ 'plain5' => '안 nasty 녕', //mixed
plain/encoded text
);
foreach ($test_strings_encoded as $string) {
//echo '<hr />'.str_replace('&', '&',
$string);