[wp-hackers] get_option returns just fine in one file, returns null in another

Ryan Bilesky rbilesky at gmail.com
Tue Mar 1 02:15:08 UTC 2011


This is real odd, if within the file that I am having problems with I add a
simple test function with this code:

$options = get_option('power_tickets');
 echo '<pre>';
 var_dump ($options['dept']);
 echo '</pre>';

and I hook into admin_notices to fire that, it works, but just doing

$options = get_option('power_tickets');
at the begining of the file doesn't seem to work, though it doesn't have
that problem on other files.


On Mon, Feb 28, 2011 at 5:44 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:

> So this is what I have
>
> $options = get_option('power_tickets');
>
> If i var_dump $options in one file i get the array of options i expect to
> see, in another file in my plugin a var_dump is returning null, any ideas I
> have no clue what would cause this it makes no sense to me.  Any ideas
> anyone because this has got me stumped.
>


More information about the wp-hackers mailing list