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
 [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-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 15 19:01:26 2021 UTC