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 » XML » XML_Parser » Bug #9328

assigned by reference error in XML_RSS parse

Details

Submitted2006-11-13 20:40 UTC
Frommmclaughlin at newtier dot com
Assignedashnazg
StatusClosed
PackageXML_Parser
PHP Version4.4.4
OSFreeBSD
Roadmaps1.3.2

Comments

[2006-11-13 20:40 UTC] mmclaughlin at newtier dot com

Description:
------------
I wrote a script to gather an external RSS feed that I could use to show the user and have them select the articles of their choosing. If a RSS feed is used that does not exist I get a MESSAGE: Only variables should be assigned by reference.

Test script:
---------------
$url = 'www.rssfeednotexist.com';

$rss =& new XML_RSS($url);
$error = $rss->parse();

Expected result:
----------------
Return an error back to my script which I could handle and display a message.

Actual result:
--------------
MESSAGE: Only variables should be assigned by reference
TYPE: Notice
FILE: /usr/local/www/data/mmclaughlin/flexreg/trunk/lib/pear/XML/Parser.php
LINE: 479
DEBUG INFO:

474 }
475 }
476 // otherwise, $this->fp must be a string
477 } else {
478 if (!$this->_parseString($this->fp, true)) {
479 $error = &$this->raiseError();

480 $this->free();
481 return $error;
482 }
483 }
484 $this->free();

[2006-11-13 23:42 UTC] mmclaughlin at newtier dot com

Adjusted from documentation package to XML_RSS package