#47206 [Com]: Unintended API change in XSLTProcessor
ID: 47206
Comment by: david dot zuelke at bitextender dot com
Reported By: nforbes@php.net
Status: Open
Bug Type: XSLT related
Operating System: Linux
PHP Version: 5.3CVS-2009-01-24 (snap)
New Comment:
Same problem here. Subclasses of XSLTProcessor can work without
E_STRICT
warning either in 5.2 or in 5.3, but not in both :(
Previous Comments:
------------------------------------------------------------------------
[2009-01-24 05:02:08] nforbes@php.net
Description:
------------
In 5.3, attempting to extend XSLTProcessor in the same way as in 5.2
(with type hinting on the method parameters) yields an E_STRICT message:
"Declaration of ExtendedXSLTProcessor::importStylesheet() should be
compatible with that of XSLTProcessor::importStylesheet()".
Removing the type hint fixes the problem in 5.3. I am assuming this
behavior is unintentional, and that the type hint should still be
associated with the methods.
This applies to both ::importStylesheet() and ::transformToDoc(), and
potentially other methods as well.
Reproduce code:
---------------
<?php
class ExtendedXSLTProcessor extends XSLTProcessor {
public function importStylesheet(DOMDocument $stylesheet) {
parent::importStylesheet($stylesheet);
/* ... */
}
}
?>
Actual result:
--------------
Strict Standards: Declaration of
ExtendedXSLTProcessor::importStylesheet() should be compatible with that
of XSLTProcessor::importStylesheet() in /.../test.php on line 8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47206&edit=1
Thread (6 messages)