Error Log, No Idea What's Messed Up

+1 Alex Riddle · April 4, 2015
Hello,

I took on a project to fix someone's WordPress theme, and I got it all working except two parts. 

These are the errors in the error log:
[03-Apr-2015 11:55:16 UTC] PHP Warning:  implode(): Invalid arguments passed in /home/sparklewash/public_html/wp-content/themes/sparkle/archive.php on line 400

[03-Apr-2015 12:31:12 UTC] PHP Warning:  implode(): Invalid arguments passed in /home/sparklewash/public_html/wp-content/themes/sparkle/franchise_index.php on line 169

Here's the archive file for the first one: Here's the archive file for the first: http://pastebin.com/CwTmHuWR
Here's the archive_index file for the second one: http://pastebin.com/6wPQG7qH

I've got no idea what's wrong with them, other than that it's bad and it may be what's making the site incredibly slow. Any help would be greatly appreciated.

Post a Reply

Replies

Oldest  Newest  Rating
+1 Çağlan Turgut · April 4, 2015
     

<?php $classarray = get_sub_field('tab'); $class = implode(" ", $classarray);?>



In your first file you're imploding elements from $classarray in the line 400. But are you making sure that it is an array? Try replacing it with this:

           

<?php $classarray = array(); $classarray = get_sub_field('tab'); $class = implode(" ", $classarray);?>

0 Alex Riddle · April 5, 2015
[04-Apr-2015 23:27:39 UTC] PHP Warning:  implode(): Invalid arguments passed in /home/sparklewash/public_html/wp-content/themes/sparkle/archive.php on line 394

Still getting this (I moved styling around, still supposed to be line 400). Any ideas?
0 Alex Riddle · April 6, 2015
[06-Apr-2015 16:55:43 UTC] PHP Fatal error:  Call to undefined function the_field() in /home/sparklewash/public_html/wp-content/themes/sparkle/index.php on line 136

http://pastebin.com/YDEA1SpM

Now I'm getting this error from the index page, this is a nightmare. Can someone please help?
  • 1

PHP

106,977 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators