]> granicus.if.org Git - php/commitdiff
Avoid unnecessary code and change the type of accelerator_enabled
authorPierrick Charron <pierrick@webstart.fr>
Wed, 13 Feb 2013 19:25:38 +0000 (14:25 -0500)
committerPierrick Charron <pierrick@webstart.fr>
Wed, 13 Feb 2013 19:25:38 +0000 (14:25 -0500)
accelerator_enabled will always be true when accelerator_get_status
returns an array. Also the accelerator_enabled should be a boolean
and not a long

zend_accelerator_module.c

index 41ae426899098e417435c4a90f34485726eab9df..807c2446a45f093d11612c9eebfedc3a43d00301 100644 (file)
@@ -470,7 +470,7 @@ static ZEND_FUNCTION(accelerator_get_status)
        array_init(return_value);
 
        /* Trivia */
-       add_assoc_long(return_value, "accelerator_enabled", ZCG(startup_ok) && ZCSG(accelerator_enabled));
+       add_assoc_bool(return_value, "accelerator_enabled", 1);
        add_assoc_bool(return_value, "cache_full", ZSMMG(memory_exhausted));
 
        /* Memory usage statistics */