Page MenuHomePhabricator

mw.ext.data.get from JsonConfig doesn't work with PHP 7
Closed, ResolvedPublic

Description

It looks like it depends whenever PHP7 setting is tuned on or off. When its off, problem disaperars, when its on, action=purge any article that uses it and you will get "false" when calling mw.ext.data.get()

Event Timeline

Legoktm triaged this task as High priority.Feb 6 2019, 5:48 PM
Legoktm created this task.

I can't reproduce it returning false, but I can reproduce it returning nil with PHP 7 thanks to rMLUS76122a04c696: Remove PHP→Lua object conversion. With HHVM it's using LuaSandbox version 2.0.14 which doesn't include that patch.

Also, now that I check, if Scribunto is using the LuaStandalone engine then we get an uncaught exception from mw.ext.data.get, and probably have since it was written. Apparently no one ever tested that before.

Change 488525 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/extensions/JsonConfig@master] JCLuaLibrary: Replace objects with arrays, recursively

https://gerrit.wikimedia.org/r/488525

Change 488525 merged by jenkins-bot:
[mediawiki/extensions/JsonConfig@master] JCLuaLibrary: Replace objects with arrays, recursively

https://gerrit.wikimedia.org/r/488525

Change 488996 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/extensions/JsonConfig@wmf/1.33.0-wmf.16] JCLuaLibrary: Replace objects with arrays, recursively

https://gerrit.wikimedia.org/r/488996

Change 488996 abandoned by Anomie:
JCLuaLibrary: Replace objects with arrays, recursively

Reason:
No longer needed, it rode the train.

https://gerrit.wikimedia.org/r/488996

@Anomie Is this issue now resolved? If not, should it block continuation of PHP 7 roll out? If so, add T176370 as parent task.

Should be resolved.