Closed szepeviktor closed 8 years ago
I'm trying to understand what the problem is but haven't gotten it yet. Can you add some more information for me so that I'll understand?
The plugin tries to echo booleans into JavaScript which does not result in the string true
or false
.
jQuery( document ).ready( function(){
setusunlocked_AdminPageFrameworkImageUploader( '{$sInputID}', '{$bRpeatable}', '{$bExternalSource}' );
});
PHP Notice: Array to string conversion in /inc/apf/factory/_common/form/field_type/AdminPageFramework_FieldType_media.php on line 442
The plugin tries to echo booleans into JavaScript which does not result in the string true or false
The value types in that functions you linked are loosely handled. However, I don't see any issue in the resulting behavior in the program.
Just for intelligibility of the code, I've changed the variable types passed to the setAdminPageFrameworkImageUploader()
and setAdminPageFrameworkMediaUploader()
functions.
PHP Notice: Array to string conversion in /inc/apf/factory/_common/form/field_type/AdminPageFramework_FieldType_media.php on line 442
Can you provide the steps to reproduce it?
Rpeatable
could be an array:
'repeatable' => array(
'max' => 4,
),
I see. I could confirm that PHP notice. Thanks for the report.
Thanks.
You are welcome!
Please fix boolean printing.
https://github.com/michaeluno/admin-page-framework/blob/master/library/apf/factory/_common/form/field_type/AdminPageFramework_FieldType_media.php#L442