Page MenuHomePhabricator

Array to string conversion in /srv/mediawiki/php-1.27.0-wmf.22/extensions/ZeroBanner/includes/ZeroSpecialPage.php on line 131
Closed, ResolvedPublic

Description

Seeing this notice pop up in the error logs quite a bit

Notice: Array to string conversion in /srv/mediawiki/php-1.27.0-wmf.22/extensions/ZeroBanner/includes/ZeroSpecialPage.php on line 131

Event Timeline

Jdlrobson added a project: good first task.
dr0ptp4kt raised the priority of this task from High to Unbreak Now!.May 9 2016, 9:59 PM
dr0ptp4kt added subscribers: DFoy, Yurik, jhobs, dr0ptp4kt.

I'm afraid this means zero-rating banner GIFs are not showing for UAs lacking good JavaScript support. Moving this to Unbreak Now and bringing this into the current sprint.

+ @Yurik @jhobs @DFoy

Is this possibly related to anything (e.g., guards) around https://lists.wikimedia.org/pipermail/wikitech-l/2016-May/085477.html ?

We now have a very strict imagemagick policy - https://gerrit.wikimedia.org/r/#/c/286676/2/modules/imagemagick/files/policy.xml that limits the scripting language. I presume that the "label:" and "caption:" we used are part of that. It was suggested that we switch to gd: http://bavotasan.com/2009/turn-text-into-an-image-using-the-php-gd-library/ ... I cannot recall why we went with imagemagick and not gd for these banners

@Yurik I took a look and this is a little beyond me. I have no idea what's going on in createImageBanner. Can you investigate the issue? Happy to merge and SWAT.

@Jdlrobson, i will have to implement this feature anew - because imagemagick is basically no longer available :(

Ok, I remembered why we used IM instead of GD - multiline text. @csteipp, can we quickly approve https://github.com/stil/gd-text -- seems like exactly the lib we need to switch away from imagemagick-generated multiline text images.

Ok, I remembered why we used IM instead of GD - multiline text. @csteipp, can we quickly approve https://github.com/stil/gd-text -- seems like exactly the lib we need to switch away from imagemagick-generated multiline text images.

(from irc)

@Yurik: It looks ok enough to include in a Zero extension. I don't feel like I have the time to look at enough for inclusion in vendors/

Change 288236 had a related patch set uploaded (by Yurik):
Use gd instead of imagemagick for legaly img banners

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

Change 288233 had a related patch set uploaded (by Yurik):
Added stil/gd-text lib

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

Change 288233 merged by jenkins-bot:
Added stil/gd-text lib

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

Change 288236 merged by jenkins-bot:
Use gd instead of imagemagick for legaly img banners

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

Yurik added a subscriber: MaxSem.

Deployed to prod. Thanks @MaxSem for helping with the sync.