Re: Tokenizer trying to create a token for DocType in HTML_Templaye_Flexy
| From: | Alan Knowles | Date: | Wed, 08 Aug 2007 03:46:34 +0000 |
| Subject: | Re: Tokenizer trying to create a token for DocType in HTML_Templaye_Flexy | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27800@lists.php.net to get a copy of this message | ||
I did come across that before.. but came to the conclusion that leaving the benefits of leaving method_exists check in, outweighted the rather messy code and potential bugs that allowing it to be turned off would entail.
Summarized as be careful when using all that magic ;)
- Just create real methods for those items...
Regards
Alan
Dan Rossi wrote:
Hi alan this works, I have a new problem now, a system im using runs a php __call to dynamically reset where a method call happens. The problem is the template is compiled with the method_exists so __call never gets run so the method doesnt get called against an external class. Is there anyway to fix this and prevent it compiling that way ? Alan Knowles wrote:It's probably a bug in the early version of the autoloader - bascially class_exists(....) used to call the autoloader all the time, this changed in recent versions - where you had to use the 2nd argument true to load the class. General advice - if you want to use an autoloader - use SPL - the default one has quite a few design flaws... Regards Alan Dan Rossi wrote:Im using PHP5's autoloader and when something like this is in html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> It tries to load a non existant file. HTML_Template_Flexy_Tokenizer->createToken('Doctype') I tried for half an hour to add a bug, but the system is really painfully non user friendly, and the captcha is horrible it claims i entered wrong values, and then i keep getting this ERROR: Email is already in use for an existing account Let me know :)