The profile area (and all other areas) are limited by the old method of procedural function calls, checked by function_exists(). I'd like to ask for this to be changed to is_callable and call_user_func_array throughout.
I already made this change to the profile area like so:
Code: [Select]
Sample code to make use of this:
Code: [Select]
I already made this change to the profile area like so:
@@ -529,7 +529,7 @@
}
// Make sure that the area function does exist!
- if (!isset($profile_include_data['function']) || !function_exists($profile_include_data['function']))
+ if (!isset($profile_include_data['function']) || !is_callable($profile_include_data['function']))
{
destroyMenu();
fatal_lang_error('no_access', false);
@@ -696,7 +696,7 @@
redirectexit('action=profile' . (we::$user['is_owner'] ? '' : ';u=' . $memID) . ';area=' . $current_area);
// Call the appropriate subaction function.
- $profile_include_data['function']($memID);
+ call_user_func_array($profile_include_data['function'], array($memID));
// Set the page title if it's not already set...
if (!isset($context['page_title']))
Sample code to make use of this:
'function' => array('Awards\Profile', 'showAwards'),