Bug #19479 [Com]: $do->getLinks() is broken in DB_DataObject 1.10.0.
| From: | skyepn@gmail.com | Date: | Fri, 07 Dec 2012 03:48:56 +0000 |
| Subject: | Bug #19479 [Com]: $do->getLinks() is broken in DB_DataObject 1.10.0. | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9393@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19479&edit=1
ID: 19479
Comment by: skyepn@gmail.com
Reported By: keitht at princeton dot edu
Summary: $do->getLinks() is broken in DB_DataObject 1.10.0.
Status: Closed
Type: Bug
Package: DB_DataObject
Operating System: Any
Package Version: 1.10.0
PHP Version: 5.3.8
Assigned To: alan_k
Roadmap Versions:
New Comment:
Also, I'm getting the following warning from 1.10.0 even with the fix
above:
[06/12/2012 19:42:12] /usr/local/share/pear/DB/DataObject/Links.php:362
WARNING: Creating default object from empty value
So I changed this in DB/DataObject/Links.php line 486
$this->_do->link_loaded = false;
to
$this->_do = new stdClass();
$this->_do->link_loaded = false;
There's probably a better class to initialize it to, but seems to work.
I'm using PHP 5.4.7
Previous Comments:
------------------------------------------------------------------------
[2012-12-07 03:26:54] skyepn
I just ran into this same bug and had to implement the fix manually,
isn't this kind of a showstopper? It's been almost 6 months, there
should be a 10.10.1 by now with this change?
------------------------------------------------------------------------
[2012-06-25 04:26:53] alan_k
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: alan_k
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Can you check the last change in subversion - looks like your fix is
correct
Regards
Alan
------------------------------------------------------------------------
[2012-06-22 22:53:08] keitht
Description:
------------
Running $do->getLinks() (with a proper set of DO's and
"database.links.ini" file that worked in 1.9.6) results in no linked
DO's being loaded into the calling DO.
The problem appears to be in DataObject/Links.php (line 358).
isset($this->do->_link_loaded) will always return TRUE because
$_link_loaded is being set to FALSE when the DataObject is initialized
(line 3041 in DataObject.php).
So (DataObject/Links.php, lines 357:360)..
// get table will load the options.
if (isset($this->do->_link_loaded)) {
return true;
}
Should be..
// get table will load the options.
if ($this->do->_link_loaded) {
return true;
}
(this is how this block of code was in 1.9.6, before it moved to
Links.php)
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19479&edit=1