Scottvs Posted August 27, 2014 Share Posted August 27, 2014 I have noticed 2 script errors on my site within the .php files but can't see why they're occurring. The first appears at the bottom of my wordpress admin page: Notice: Array to string conversion in /home/orkwine/public_html/test/wp-includes/class.wp-scripts.php on line 123 This is the area in that file: `$srce = apply_filters( 'script_loader_src', $src, $handle );if ( $this->in_default_dir($srce) ) {$this->print_code .= $this->print_extra_script( $handle, false );$this->concat .= "$handle,";$this->concat_version .= "$handle$ver";return true;} else {$this->ext_handles .= "$handle,";$this->ext_version .= "$handle$ver";}}`Line 123 is: $this->ext_version .= "$handle$ver";The other error i am getting is: Notice: Undefined index: prettyPhoto in /home/orkwine/public_html/test/wp-includes/class.wp-scripts.php on line 185 Notice: Trying to get property of non-object in /home/orkwine/public_html/test/wp-includes/class.wp-scripts.php on line 185 These are lines 183-194 in that file:` function set_group( $handle, $recursion, $group = false ) { if ( $this->registered[$handle]->args === 1 )$grp = 1;else$grp = (int) $this->get_data( $handle, 'group' ); if ( false !== $group && $grp > $group )$grp = $group; return parent::set_group( $handle, $recursion, $grp );}`Line 185 is: if ( $this->registered[$handle]->args === 1 )Can anyone help solve these errors? The full file can be seen here:http://pastebin.com/spBAhuHf Here is a link to one of the pages in the website which shows the second error. http://test.orkneywine.co.uk/online-store/elderberry-borealis-35cl/ Can anyone help with this? Quote Link to comment https://forums.phpfreaks.com/topic/290677-script-errors-public_html%E2%80%A6wp-scriptsphp/ Share on other sites More sharing options...
ginerjm Posted August 27, 2014 Share Posted August 27, 2014 line 123 - one of the vars on that line is inappropriate for whatever is going on there. Is $handle or $ver an array perhaps and you are expecting it to be a string? line 185 is bogus - somewhere else you have a usage of 'prettyPhoto' as an index into an array variable and the array doesn't have an element by that key. Simple as that. The code you showed for this problem does not appear to be the correct chunk. Quote Link to comment https://forums.phpfreaks.com/topic/290677-script-errors-public_html%E2%80%A6wp-scriptsphp/#findComment-1489059 Share on other sites More sharing options...
Scottvs Posted August 27, 2014 Author Share Posted August 27, 2014 In all honesty, i don't have a clue. This is my first time looking at any script, and only because these errors are coming up. I have tried disabling all plugins, yet the errors still exist so it is not to do with any of those. Any advice on how to fix these?That is the lines that the error message refers to, although i did question why it refers to this line as there is no reference to 'prettyPhoto' in any of that file..Any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/290677-script-errors-public_html%E2%80%A6wp-scriptsphp/#findComment-1489064 Share on other sites More sharing options...
Scottvs Posted August 27, 2014 Author Share Posted August 27, 2014 line 123 - one of the vars on that line is inappropriate for whatever is going on there. Is $handle or $ver an array perhaps and you are expecting it to be a string? I have managed to get rid of this one by just deleting the $ver part, not sure if this is an adequate fix but it has removed the error code.. Still no ideas on the other one. Quote Link to comment https://forums.phpfreaks.com/topic/290677-script-errors-public_html%E2%80%A6wp-scriptsphp/#findComment-1489067 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.