On 20/10/12 09:12, Jeroen De Dauw wrote:
> Hey,
>
> Is there currently a way for extensions to register additional info they
> gather during the parsing process to the parser output? Right now Semantic
> MediaWiki is doing this by assigning to the non-defined field $mSMWData
> which causes notices when strict is on with PHP 5.4, so I am looking for a
> good way to fix this.
That's the way a lot of extensions do it. Can you show the text of the
E_STRICT notice? It seems to work for me:
$ /usr/local/php-master-nodebug/bin/php --version
PHP 5.5.0-dev (cli) (built: Jul 31 2012 13:10:24)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
$ /usr/local/php-master-nodebug/bin/php -a
Interactive shell
php > error_reporting(E_ALL|E_STRICT);
php > class Foo {}
php > $foo = new Foo;
php > $foo->blah = 'blah';
No notice. Of course, this gives a notice:
php > $foo->bar;
Notice: Undefined property: Foo::$bar in php shell code on line 1
But that's what isset() is for.
-- Tim Starling
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l