22 Aug
2006
22 Aug
'06
8:55 p.m.
Currently Drupal just has a stern warning that messing with the PHP code for a block can really mess up your site. Two other possible solutions are the aforementioned javascript drupal_eval check OR using previews for any page that has a php input format. Using javascript has the drawback of not working for all browsers. Previews have the drawback of being relatively slow/painful. I'm not sure there's really a better solution than the one we've got (stern warnings).
you can do a syntax check and not eval the code: php -l is the command line way. there is probably a non command line way. i don't like actually running the code via ajax or preview since the code might actually DO something.