1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Fix issue where "{Fnnn, size}" renders as though "size=full"

Summary: We interpret "size" as "size => true", and "true == 'full'", so we hit the wrong branch in the switch(). String cast explicitly.

Test Plan: Typed `{Fnnn, size}`; saw it render as a thumb instead of full.

Reviewers: btrahan, codeblock

Reviewed By: codeblock

CC: frozendevil, aran

Differential Revision: https://secure.phabricator.com/D4323
This commit is contained in:
epriestley 2013-01-02 14:03:29 -08:00
parent a3fdb20a8e
commit ea52c30bca

View file

@ -50,7 +50,7 @@ final class PhabricatorRemarkupRuleEmbedFile
$options['name'] = $file_name; $options['name'] = $file_name;
$attrs = array(); $attrs = array();
switch ($options['size']) { switch ((string)$options['size']) {
case 'full': case 'full':
$attrs['src'] = $file->getBestURI(); $attrs['src'] = $file->getBestURI();
$options['image_class'] = null; $options['image_class'] = null;