felipe                                   Thu, 17 Mar 2011 11:43:05 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=309341

Log:
- Fix infile return on duplicated key (related to bug #54242)

Bug: http://bugs.php.net/54242 (Closed) dba_insert returns true if key already 
exists
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/dba/dba_flatfile.c
    U   php/php-src/branches/PHP_5_3/ext/dba/dba_inifile.c

Modified: php/php-src/branches/PHP_5_3/ext/dba/dba_flatfile.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/dba/dba_flatfile.c 2011-03-17 10:31:28 UTC 
(rev 309340)
+++ php/php-src/branches/PHP_5_3/ext/dba/dba_flatfile.c 2011-03-17 11:43:05 UTC 
(rev 309341)
@@ -96,7 +96,7 @@
                return SUCCESS;
        case 1:
                php_error_docref1(NULL TSRMLS_CC, key, E_WARNING, "Key already 
exists");
-               return SUCCESS;
+               return FAILURE;
        }
 }


Modified: php/php-src/branches/PHP_5_3/ext/dba/dba_inifile.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/dba/dba_inifile.c  2011-03-17 10:31:28 UTC 
(rev 309340)
+++ php/php-src/branches/PHP_5_3/ext/dba/dba_inifile.c  2011-03-17 11:43:05 UTC 
(rev 309341)
@@ -102,7 +102,7 @@
                return SUCCESS;
        case 1:
                php_error_docref1(NULL TSRMLS_CC, key, E_WARNING, "Key already 
exists");
-               return SUCCESS;
+               return FAILURE;
        }
 }


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

Reply via email to