Using $this->get_config() in configuration seg faults apa
Posted: Sun Mar 20, 2005 11:56 pm
In my installation, $this->get_config('key') with no default set (or if the default is set to NULL) seg faults apache when used in the function introspect_config_item($name, &$propbag).
Example:
Example:
Code: Select all
case 'secret_key':
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_SIDEBAR_MOTM_KEY);
$secret_key = $this->get_config('secret_key');
if (!$secret_key)
$secret_key = PLUGIN_SIDEBAR_MOTM_KEY_KEY;
$propbag->add('description', sprintf(PLUGIN_SIDEBAR_MOTM_KEY_DESC,$serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/motm-update&track=%t&artist=%a&album=%b&genre=%g&tracktime=%y&secret_key=' . $secret_key));
$propbag->add('default', '');
break;