cvs: pear /MDB/MDB Common.php

From: Date: Fri, 20 Dec 2002 12:12:00 +0000
Subject: cvs: pear /MDB/MDB Common.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7931@lists.php.net to get a copy of this message
lsmith Fri Dec 20 07:12:00 2002 EDT Modified files: /pear/MDB/MDB Common.php Log: made selectedRowRange less strict about the datatypes it gets passed Index: pear/MDB/MDB/Common.php diff -u pear/MDB/MDB/Common.php:1.79 pear/MDB/MDB/Common.php:1.80 --- pear/MDB/MDB/Common.php:1.79 Wed Dec 4 05:16:16 2002 +++ pear/MDB/MDB/Common.php Fri Dec 20 07:11:59 2002 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.79 2002/12/04 10:16:16 lsmith Exp $ +// $Id: Common.php,v 1.80 2002/12/20 12:11:59 lsmith Exp $ /** * @package MDB @@ -1384,11 +1384,13 @@ return $this->raiseError(MDB_ERROR_UNSUPPORTED, '', '', 'Set selected row range: selecting row ranges is not supported by this driver'); } - if (gettype($first) != 'integer' || $first < 0) { + $first = (int)$first; + if ($first < 0) { return $this->raiseError(MDB_ERROR_SYNTAX, '', '', 'Set selected row range: it was not specified a valid first selected range row'); } - if (gettype($limit) != 'integer' || $limit < 1) { + $limit = (int)$limit; + if ($limit < 1) { return $this->raiseError(MDB_ERROR_SYNTAX, '', '', 'Set selected row range: it was not specified a valid selected range row limit'); }

« previous php.pear.cvs (#7931) next »