PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_NestedSet » Bug #2000

CVS $Revision interpreted as variable

Details

Submitted2004-07-28 00:13 UTC
Frompear_bugs at adaran dot net
Assigneddatenpunk
StatusClosed
PackageDB_NestedSet
PHP Version4.3.8
OSLinux
Roadmaps(Not assigned)

Comments

[2004-07-28 00:13 UTC] pear_bugs at adaran dot net

Description:
------------
When all warnings are enabled in PHP.ini, PHP will also
warn if trying to use a variable that does not exist. When
calling apiVersion(), this will result in the following
output:

Notice: Undefined variable: Revision
in /usr/lib/php/DB/NestedSet.php on line 2065

Line 2065 looks like this:
'revision' => str_replace('$', '', "$Revision: 1.83 $")


This is because the CVS $Revision$ string is enclosed in
double tags ("). PHP tries to find a variable named
$Revision, which doesn't exist.

Putting the string in single quotes, fixes this:

'revision' => str_replace('$', '', '$Revision: 1.83 $')

[2004-07-29 10:54 UTC] dk at webcluster dot at

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.