]> granicus.if.org Git - php/commitdiff
- Any php object converts to boolean as true
authorMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 18:46:01 +0000 (18:46 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 18:46:01 +0000 (18:46 +0000)
Zend/zend_object_handlers.c

index 52cad9c7ef62052c27ad24e5c6984038397179dc..976c24b51b428b00e2372934b54d08d9b019626f 100644 (file)
@@ -1038,6 +1038,10 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
                                }
                        }
                        return FAILURE;
+               case IS_BOOL:
+                       INIT_PZVAL(writeobj);
+                       ZVAL_BOOL(writeobj, 1);
+                       return SUCCESS;
                default:
                        break;
        }