Edit report at http://pear.php.net/bugs/bug.php?id=18675&edit=1

ID: 18675
Updated by: daniel.oconnor@gmail.com
Reported By: lgillentine at gmail dot com
Summary: Strict Standards Errors with XML_Util in php 5.3.6
Status: Open
Type: Bug
Package: XML_Serializer
Operating System: Mac Os X 10.6
Package Version: 0.20.2
PHP Version: 5.3.6
Roadmap Versions:
New Comment:

Thanks for the patch Lee; but XML_Util is a bit of an old relic from the
PHP4 era. In
order to maintain compatability with PHP4 (there are folks who do use
it); we can't
apply the changes you've suggested directly.

If you wanted to make an XML_Util2 (basically your patch plus any other
fixes) and XML_Serializer2; that would be a different story. Take a look
@ http://pear.php.net/pepr for more details.

Previous Comments:

[2011-07-20 23:36:41] lgillentine

Added #patch bug:18675;patch:XML_Util-singleton;revision:1311201401;.


[2011-07-20 23:09:40] lgillentine

When I try to seralize an array, php throws a bunch of
warnings. I'm pretty certain that this is because I'm running
version 5.3.6 and have Strict warnings turned on.

The warnings are about methods in the XML_Util class being
called non-statically from the XML_Serializer class.

I have resolved this by explicitly declaring the methods in
XML_Util as public static functions, which makes php happy. I
think this is the correct way to do it, as XML_Util is running as
a singleton.

Test script:
$foo = array(
'bye' => 'goodbye'
$Serializer = new XML_Serializer($serializer_options);

echo $Serializer->getSerializedData();

Expected result:
Results return as expected, but I get a bunch of Strict standards

Actual result:
Here is an example of the error I am getting:

Strict standards: Non-static method
XML_Util::createTagFromArray() should not be called statically,
assuming $this from incompatible context in
/opt/local/lib/php/XML/Serializer.php on line 1231


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedJul 30, '11 at 9:51a
activeJul 30, '11 at 9:51a

1 user in discussion

Daniel Oconnor: 1 post



site design / logo © 2021 Grokbase