php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16531 XML_RSS produces some warnings
Submitted: 2002-04-10 10:46 UTC Modified: 2002-04-11 01:35 UTC
From: M dot Hankus at ce3 dot pl Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.1.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 - 1 = ?
Subscribe to this entry?

 
 [2002-04-10 10:46 UTC] M dot Hankus at ce3 dot pl
I've just installed XML/RSS module from PEAR. It produces
some warnings because .= operator is used on uninitialised value. Solution below (DC:CREATOR, DC:DATE are some additional elements from Dublin Core http://dublincore.org/2001/08/14/dces which I use - which  might also be added to a module)


206c206,208
<                     case "DESCRIPTION" :
---
>                     case "DESCRIPTION" :
>                     case "DC:CREATOR":
>                     case "DC:DATE":
267,268c269,273
<     {
<         $this->{$type}[$field] .= $value;
---
>     {
> 	if(empty($this->{$type}) || empty($this->{$type}[$field])) 
> 	    $this->{$type}[$field] = $value;
> 	else 
>     	    $this->{$type}[$field] .= $value;

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC