?
avatar mediaiberia
mediaiberia
12 Sep 2012

Error en algunas pantallas

PHP Notice: Array to string conversion in ../libraries/cms/form/field/media.php on line 197

Esto se debe a que se está reutilizando el nombre de la variable $attr como array cuando ya estaba definida como string en la línea 167 de media.php.

        $attr = array(
            'id' => $this->id . '_preview',
            'class' => 'media-preview',
            'style' => $style,
        );
        $img = JHtml::image($src, JText::_('JLIB_FORM_MEDIA_PREVIEW_ALT'), $attr);

Solución: Cambiar esta variable en este punto por otro nombre distinto, por ejemplo $aAttr
$aAttr = array(
'id' => $this->id . 'preview',
'class' => 'media-preview',
'style' => $style,
);
$img = JHtml::image($src, JText::
('JLIB_FORM_MEDIA_PREVIEW_ALT'), $aAttr);

avatar angelbupr angelbupr - open - 12 Sep 2012
avatar realityking realityking - close - 12 Sep 2012
avatar zero-24 zero-24 - close - 12 Sep 2012
avatar realityking
realityking - comment - 12 Sep 2012

Thanks for the report. This has been fixed in master.

I could deduce the meaning of your report because I had already fixed the bug but in the future please keep reports in english - that way more developers will be able to read the report and you have a higher chance of the bug being fixed.

avatar javigomez
javigomez - comment - 14 Sep 2012

Thanks @realityking for you effort in understanding spanish ^_^

Gracias @angelbupr por reportar el error. Cómo dice Rouven, en github habría que hacer los reportes en inglés para que otros programadores de todo el mundo puedan entender los reportes. En cualquier caso gracias de nuevo por tu excelente aportación, y si tienes otras aportaciones contacta conmigo ( en twitter @javi_gomez ) y te ayudo a traducir el texto.

avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?
Build staging

Add a Comment

Login with GitHub to post a comment