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

Jan Schneider jan at horde.org
Thu Jun 3 08:15:30 PDT 2004


Zitat von Vitor Horewicz <vitor at inf.ufsc.br>:

>  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

I have absolutely no idea what you're trying to ask.

Jan.

--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting.php


More information about the dev mailing list