[dev] what did I missed? -- an issue in Registry.php

Vitor Horewicz vitor at inf.ufsc.br
Thu Jun 3 07:52:37 PDT 2004


 Hello everyone,

 I'm really sorry for such a basic question, but I'm not sure why the
following snipet of code should work. It was taken from the
lib/Registry.php. Should'nt the key be named 'status', as its written in
config/registry.php?

 Below there's is a prove of concept.

 Guess it will just take 5 secs for you to realize where I made a mistake.

 By the way, thanks for all the good work with the Horde Framework.

 vitor

--- starts here

foreach (array_keys($this->applications) as $appName) {
            // Simply discard applications marked as inactive.
            if (array_key_exists('active', $this->applications[$appName]) &&
                !$this->applications[$appName]['active']) {
                unset($this->applications[$appName]);
                continue;
            }

--- ends here

--- starts here

php -r '$array_search = array("status"=>"active");
echo array_key_exists("active", $array_search) ? "\nthe element is in the
array\n" : "\n the element is NOT in the array\n";'

--- ends here



More information about the dev mailing list