My-Meta-Box icon indicating copy to clipboard operation
My-Meta-Box copied to clipboard

PHP Errors

Open iolson opened this issue 10 years ago • 2 comments

Has anyone else had these issues (class has only had one line added/altered, and this was to enqueue our custom jQuery for admin page), and figured out how to resolve these issues?

Added on Line 166: wp_enqueue_script( 'meta-box-custom-js', $plugin_path . '/js/custom-scripts.js', array( 'jquery' ), null, true );

Error 1

PHP Warning: Illegal string offset 'type' in /meta-box-class/my-meta-box-class.php on line 1186

Line 1186: $temp[] = $repeater_field['type'];

Error 2

PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'AT_Meta_Box' does not have a method 'show_field_' in /meta-box-class/my-meta-box-class.php on line 451

Line 451: call_user_func ( array( $this, 'show_field_' . $f['type'] ), $f, '');

Error 3

PHP Warning: Illegal string offset 'id' in /meta-box-class/my-meta-box-class.php on line 445 PHP Warning: Illegal string offset 'id' in /meta-box-class/my-meta-box-class.php on line 446

Line 445: $id = $field['id'].'[CurrentCounter]['.$f['id'].']'; Line 446: $f['id'] = $id;

Error 4

PHP Warning: Illegal string offset 'type' in /meta-box-class/my-meta-box-class.php on line 450 PHP Warning: Illegal string offset 'type' in /meta-box-class/my-meta-box-class.php on line 451 PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'AT_Meta_Box' does not have a method 'show_field_c' in /meta-box-class/my-meta-box-class.php on line 451

Line 450: if ($f['type'] != 'wysiwyg') Line 451: call_user_func ( array( $this, 'show_field_' . $f['type'] ), $f, '');

iolson avatar Jun 16 '14 15:06 iolson

Create a fork and post me the link, I'll give it a look.

bainternet avatar Jul 06 '14 08:07 bainternet

ive also been getting similar errors:

Warning: Illegal string offset 'type' in /home/sites/heteml/users42/h/i/r/hiroin/web/hiroin/test/wp-content/themes/hiroin/meta-box-class/my-meta-box-class.php on line 1156

Warning: Illegal string offset 'type' in /home/sites/heteml/users42/h/i/r/hiroin/web/hiroin/test/wp-content/themes/hiroin/meta-box-class/my-meta-box-class.php on line 1158

Warning: array_merge(): Argument #2 is not an array in /home/sites/heteml/users42/h/i/r/hiroin/web/hiroin/test/wp-content/themes/hiroin/meta-box-class/my-meta-box-class.php on line 1160

The weird thing is that I've tested it on my server (US based), which works, and my client's server (JP based), where it doesnt work.

sn00pee avatar Aug 11 '15 02:08 sn00pee