stacey
stacey copied to clipboard
Get rid of evals
instead of foreach($assets as $asset_type => $asset_files) eval('$page->'.$asset_type.'=$asset_files;'); why not use something like foreach($assets as $asset_type => $asset_files) $page->$asset_type = $asset_files; etc.
Irritatingly, that technique doesn't work with all versions of php5.
Even worse, the correct technique, call_user_func has bugs on certain php5.* versions, but not all. So eval turns out to be the only way (that I know of) to do this, while supporting all php5 variations.