Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Error in image_meta.php (http://forum.bytesforall.com/showthread.php?t=20813)

brasofilo Aug 23, 2013 08:44 AM

[SOLVED] Error in image_meta.php
 
I'm not sure if it's me messing with the theme and trying to understand its template logic. But I'm receiving one notice and two warnings (with WP_DEBUG enabled). The virtual template is set to image and I'm not being able to set it as Best match....

Quote:

Notice: Uninitialized string offset: 0 in /wp-content/themes/testing/montezuma/includes/image_meta.php on line 34

Warning: array_keys() expects parameter 1 to be array, string given in /wp-content/themes/testing/montezuma/includes/image_meta.php on line 34

Warning: Invalid argument supplied for foreach() in /wp-content/themes/testing/montezuma/includes/image_meta.php on line 40
I'm solving it adding a check for $meta in the function bfa_image_meta:

Code:

$meta = wp_get_attachment_metadata();
if( empty( $meta ) )
    return;


brasofilo Aug 23, 2013 08:48 AM

While writing the topic, I discovered what happened:

- I created an actual page template in the theme folder and set it for one page

- Set also the Virtual Template to image

- Disabled the actual template and the page gets locked into an image VT

- The notice and warnings pop-up

- Enabled the actual template back

- Selected Default Template

- Updated

- Was able to set the VT back to Best match...

lmilesw Aug 23, 2013 10:30 AM

So can this be set to "Solved"? To do that you can just click on "Thread Tools" and then click on "Mark this thread as solved".


All times are GMT -6. The time now is 01:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.