PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Networking » Net_LDAP » Bug #8286

warning about passing by reference

Details

Submitted2006-07-25 15:36 UTC
Fromglen at delfi dot ee
Assignedbeni
StatusClosed
PackageNet_LDAP
PHP Version5.1.4
OSPLD Linux
Roadmaps(Not assigned)

Comments

[2006-07-25 15:36 UTC] glen at delfi dot ee

Description:
------------
[Tue Jul 25 17:54:47 2006] [error] PHP Notice: Only
variable references should be returned by reference
in /usr/share/pear/Net/LDAP
.php on line 893
[Tue Jul 25 17:54:47 2006] [error] PHP Notice: Only
variable references should be returned by reference
in /usr/share/pear/Net/LDAP
.php on line 893
[Tue Jul 25 17:54:47 2006] [error] PHP Notice: Only
variable references should be returned by reference
in /usr/share/pear/Net/LDAP
.php on line 893

proposed fix:
--- /usr/share/pear/Net/LDAP.php~ 2006-03-30
01:48:24.000000000 +0300
+++ /usr/share/pear/Net/LDAP.php 2006-07-25
17:56:47.919303818 +0300
@@ -890,7 +890,8 @@
$entry = $result->shift_entry();
if (false === $entry) return
$this->raiseError('Could not fetch RootDSE entry');

- return new Net_LDAP_RootDSE($entry);
+ $ret = new Net_LDAP_RootDSE($entry);
+ return $ret;
}

/**

[2006-09-04 03:32 UTC] ben at horde dot org

Simular problem with LDAP/Schema.php

Notice: Only variable references should be returned by reference in /usr/lib/php/Net/LDAP/Schema.php on line 113

Patch to fix it:

--- Schema.php.original 2006-09-03 22:26:06.000000000 -0500
+++ Schema.php 2006-09-03 22:26:59.000000000 -0500
@@ -110,7 +110,8 @@
'syntaxes' => &$this->_ldapSyntaxes );

$key = strtolower($type);
- return ((key_exists($key, $map)) ? $map[$key] : $this->raiseError("Unknown type $type"));
+ $ret = ((key_exists($key, $map)) ? $map[$key] : $this->raiseError("Unknown type $type"));
+ return $ret;
}

/**

[2006-09-05 09:28 UTC] b dot hallinger at skyforcesystems dot de

The Patch here produces a copy&paste issue.
I made a new patch file available that combines both patches above. It should clean apply if patch is called inside Net/ to:
* LDAP.php CVS revision 1.28
* LDAP/Schema.php CVS revision 1.9

it can be downloaded from http://beni.skyforcesystems.de/patches/net_ldap/patch_bug_8286.patch