Edit report at https://bugs.php.net/bug.php?id=64020&edit=1

 ID:                 64020
 Updated by:         tyr...@php.net
 Reported by:        mateusz dot goik at aliantsoft dot pl
 Summary:            bug.php.net - mysql error - begin
 Status:             Closed
 Type:               Bug
 Package:            Website problem
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        tyrael
 Block user comment: N
 Private report:     N

 New Comment:

I've commited a fix, it should be updated on the server soon.


Previous Comments:
------------------------------------------------------------------------
[2013-01-18 14:31:11] tyr...@php.net

Automatic comment on behalf of tyr...@gmail.com
Revision: 
http://git.php.net/?p=web/bugs.git;a=commit;h=dcc9d0e39e2356cc69b29d73a2cb05468da0b951
Log: Fixed bug #64020 (reject negative values for the limit value)

------------------------------------------------------------------------
[2013-01-18 13:16:38] mateusz dot goik at aliantsoft dot pl

Description:
------------
Hi,

https://bugs.php.net/search.php?cmd=display&begin=1 -> OK
https://bugs.php.net/search.php?cmd=display&begin=-1 -> ERROR

File:
https://svn.php.net/viewvc/web/php-bugs/trunk/include/query.php?view=markup

................
38      $begin = (int) (!empty($_GET['begin']) ? $_GET['begin'] : 0);
................
240     if ($limit != 'All' && $limit > 0) {
241     $query .= " LIMIT $begin, $limit";
242     }
................

Fix: $begin >= 0

mysql example:
select 1 limit 0,1 -> OK
select 1 limit -1,1 -> ERROR





------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64020&edit=1

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to