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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user