mvlcek Wrote:BTW: a return after the eval would be beneficialWhat kind of return would you suggest? Something like this? (Modifying get_component() from the SVN.)
Code:
function get_component($id) {
global $components;
if (func_num_args() > 1) { $args = func_get_args(); array_shift($args); }
if (!$components) {
if (file_exists(GSDATAOTHERPATH.'components.xml')) {
$data = getXML(GSDATAOTHERPATH.'components.xml');
$components = $data->item;
} else {
$components = array();
}
}
if (count($components) > 0) {
foreach ($components as $component) {
if ($id == $component->slug) {
$eval = eval("?>" . strip_decode($component->value) . "<?php ");
}
}
}
return $eval===NULL||$eval!==FALSE;
}
“Don’t forget the important ˚ (not °) on the a,†says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!