Doc #54030 [Opn->Csd]: getenv() docs don't say what getenv() returns if variable not found

From: Date: Sat, 11 Jun 2011 23:35:44 +0000
Subject: Doc #54030 [Opn->Csd]: getenv() docs don't say what getenv() returns if variable not found
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-6726@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=54030&edit=1 ID: 54030 Updated by: dtajchreber@php.net Reported by: petern at kol dot co dot nz Summary: getenv() docs don't say what getenv() returns if variable not found -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: dtajchreber Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. getenv() returns false if the environment variable doesn't exist. [1] http://lxr.php.net/opengrok/xref/PHP_5_3/ext/standard/basic_functions.c#3989 Previous Comments: ------------------------------------------------------------------------ [2011-06-12 01:33:09] dtajchreber@php.net Automatic comment from SVN on behalf of dtajchreber Revision: http://svn.php.net/viewvc/?view=revision&revision=312071 Log: Fixes bug #54030 - clarifies getenv() behavior if the environment variable does not exist. Patch by Matthew Fonda ------------------------------------------------------------------------ [2011-02-16 09:20:55] petern at kol dot co dot nz Description: ------------ --- From manual page: http://www.php.net/function.getenv --- The getenv() docs don't tell us what getenv() returns if the requested environment variable doesn't exist. They just say: "Returns the value of the environment variable varname, or FALSE on an error." Mmmmmm. But is the requested variable not existing classed an error? Or not? I personally don't think it is. And that a return of NULL in this situation would be best. But what actually happens? Some clarification would be useful. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54030&edit=1

« previous php.doc.bugs (#6726) next »