First post on this forum here. Mainly a frontend developer for WordPress as well as SEO, but getting into backend development more and more.
Been having an issue with a site and trying to solve one particular error. When I send a contact form on a WordPress site I maintain for a client and built a theme for a year ago I now get the error:
[04-Feb-2015 07:07:28] PHP Fatal error: Cannot redeclare class My_meta_box in /../../wp-content/themes/cosily/inc/meta-boxes.php on line 416
That is where a class for meta boxes starts.
foreach ($meta_boxes as $meta_box) {
$my_box = new My_meta_box($meta_box);
}
class My_meta_box {
protected $_meta_box;
....
But when I grep for that word to see where else that class may be declared in a full backup I see
grep -nr My_meta_box* .
./wp-content/themes/cosily/inc/meta-boxes.php:412: $my_box = new My_meta_box($meta_box);
./wp-content/themes/cosily/inc/meta-boxes.php:416:class My_meta_box {
So there is only one metion of this class. One time declared as a new class and then followed by the class with all the data. So why would it mention this error? How can I debug this further?