derick          Mon Mar  1 03:11:47 2004 EDT

  Added files:                 (Branch: PHP_4_3)
    /php-src/tests/lang bug27443.phpt 

  Modified files:              
    /php-src    NEWS 
    /Zend       zend_builtin_functions.c 
  Log:
  - MFH: Fixed bug #27443 (defined() returns wrong type).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.579&r2=1.1247.2.580&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.579 php-src/NEWS:1.1247.2.580
--- php-src/NEWS:1.1247.2.579   Wed Feb 25 17:12:02 2004
+++ php-src/NEWS        Mon Mar  1 03:11:44 2004
@@ -3,6 +3,7 @@
 ?? Feb 2004, Version 4.3.5
 - Fixed possible crashes inside socket extension, due to missing check inside
   allocation functions. (Ilia)
+- Fixed bug #27443 (defined() returns wrong type). (Derick)
 - Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
 - Fixed bug #27383 (Potential crash inside fopen_wrapper, while parsing
   response code). (Ilia)
http://cvs.php.net/diff.php/Zend/zend_builtin_functions.c?r1=1.124.2.13&r2=1.124.2.14&ty=u
Index: Zend/zend_builtin_functions.c
diff -u Zend/zend_builtin_functions.c:1.124.2.13 
Zend/zend_builtin_functions.c:1.124.2.14
--- Zend/zend_builtin_functions.c:1.124.2.13    Thu Aug 28 12:08:11 2003
+++ Zend/zend_builtin_functions.c       Mon Mar  1 03:11:46 2004
@@ -490,9 +490,9 @@
        convert_to_string_ex(var);
        if (zend_get_constant((*var)->value.str.val, (*var)->value.str.len, &c 
TSRMLS_CC)) {
                zval_dtor(&c);
-               RETURN_LONG(1);
+               RETURN_TRUE;
        } else {
-               RETURN_LONG(0);
+               RETURN_FALSE;
        }
 }
 /* }}} */

http://cvs.php.net/co.php/php-src/tests/lang/bug27443.phpt?r=1.1&p=1
Index: php-src/tests/lang/bug27443.phpt
+++ php-src/tests/lang/bug27443.phpt
--TEST--
Bug #27443 (defined() returns wrong type)
--FILE--
<?php
echo gettype(defined('test'));
?>
--EXPECT--
boolean

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

Reply via email to