Topic: Fatal error: Call to undefined...

Didn't know if to post this here or in bug reports, and i couldn't find anything on this in the search.
Every time i am in admin panel and try to go to extensions, i get this message:

Extensions available for install

Fatal error: Call to undefined function token_get_all() in /hosted/subs/ulmb.com/g/f/gfxplague/public_html/include/xml.php on line 199

Nothing will load, it only appears when i have an extension in the extensions folder. I just cannot work out why its happening, hopefully someone here will be able to help me so i can have some extensions installed..

Re: Fatal error: Call to undefined...

I had a similar problem about a year ago. In my case, I just changed

$tokenized_hook = token_get_all('<?php '.$hook['content']);

to

('<?php '.$hook['content']);

So far, changing that one line in /FORUM_ROOT/include/xml.php hasn't caused any problems.

Re: Fatal error: Call to undefined...

octavian_3009 wrote:

I had a similar problem about a year ago. In my case, I just changed

$tokenized_hook = token_get_all('<?php '.$hook['content']);

to

('<?php '.$hook['content']);

So far, changing that one line in /FORUM_ROOT/include/xml.php hasn't caused any problems.

Forum was stable after you changed that?

4 (edited by octavian_3009 2010-02-15 20:01)

Re: Fatal error: Call to undefined...

I've had to fix a few other problems before and after, but nothing specifically related to that piece of code in xml.php

5 (edited by inferno 2010-02-15 20:37)

Re: Fatal error: Call to undefined...

I can now view the extensions page. Thanks octavian_3009. I got this on the extensions page though:

Warning: array_pop() [function.array-pop]: The argument should be an array in /***/***/***/*/*/***/public_html/include/xml.php on line 200
Warning: array_pop() [function.array-pop]: The argument should be an array in /***/***/***/*/*/***/public_html/include/xml.php on line 200
Warning: array_pop() [function.array-pop]: The argument should be an array in /***/***/***/*/*/***/public_html/include/xml.php on line 200
Warning: array_pop() [function.array-pop]: The argument should be an array in /***/***/***/*/*/***/public_html/include/xml.php on line 200
Warning: array_pop() [function.array-pop]: The argument should be an array in /***/***/***/*/*/***/public_html/include/xml.php on line 200
Warning: array_pop() [function.array-pop]: The argument should be an array in /***/***/***/*/*/***/public_html/include/xml.php on line 200

So i just removed (on line 200):

$last_element = array_pop($tokenized_hook);

Hopefully it wont prove to be a bad move and be fatal on my part.. I checked /admin/index.php?action=phpinfo and --disable-tokenizer wasn't there so not sure of the overall problem. But all seems to be good now and working fine, unless i run into problems later. I'll let you guys know!