[wp-hackers] Weird 1.5 template behaviour
Stephen Cropp
steve at de-generationx.net
Mon Jan 17 12:12:45 GMT 2005
Stephen Cropp wrote:
> Okay... This is a little bizarre and I cannot find any reason as to why
> this might happen.
>
> Here are some of the errors that are appearing when you load the page...
>
> -----8<-----
> Warning: Variable passed to each() is not an array or object in
> /home/scropp/public_html/includes/lib-xmlrpc-class.inc.php on line 70
>
> Warning: main(): Failed opening '/includes/buttons.php' for inclusion
> (include_path='.:/usr/lib/php:/usr/local/lib/php') in
> /home/scropp/public_html/dev/wp-content/themes/dgenx/sidebar.php on line 21
>
> Fatal error: Call to a member function on a non-object in
> /home/scropp/public_html/dev/wp-content/themes/dgenx/sidebar.php on line 22
> -----8<-----
>
> So my simple question is, why is get_header(); not working while a
> simple include(); does? That is ultimately the only difference between
> the two. I've tried tracing it, but I really cannot find a reason for it
> to do so.
>
> Anyone have any ideas? This one is kind of bugging me ;-)
Further to this, it appears that it happens with all get_*(); functions.
I tried require('header.php'); and left get_sidebar(); there and the
sidebar still had errors in it. So it appears that if I use get_*(); to
include any part of the theme, even with a global $dgenxhome, those
parts can't access the vars in dgenx.conf.php for some reason.
But the weird part is the functions still works :-|
So for now, I am sticking with require(); to put the various parts of
the theme together.
Still, any ideas would really be appreciated.
More information about the hackers
mailing list