nicksagona / popphp-v1-legacy

Pop PHP Framework v1.7.0 : A Lightweight PHP Framework
http://www.popphp.org/
Other
42 stars 7 forks source link

\Pop\Http\Request::getEnv returns wrong value #2

Closed jlslew closed 11 years ago

jlslew commented 11 years ago

Error in file /vendor/PopPHPFramework/src/Pop/Http/Request.php at line 549. Shouldn't it be return $this->env;? Link

/**
 * Get a value from $_ENV, or the whole array
 *
 * @param string $key
 * @return string|array
 */
public function getEnv($key = null)
{
    if (null === $key) {
        return $this->server;
    } else {
        return (isset($this->env[$key])) ? $this->env[$key] : null;
    }
}
nicksagona commented 11 years ago

Yes, you're correct - thanks for the catch. It's been patched.