Draft: [FIX]mod-func-directory_last_sites.php: Fix undefined array key desc and maxdesc
requested to merge bkinywa24/tiki:fix-undefined-array-key-desc-in-mod-func-directory_last_sites.php into master
This is to fix ERROR (E_WARNING): Undefined array key "desc"
and ERROR (E_WARNING): Undefined array key "maxdesc"
in mod-func-directory_last_sites.php on master when we are using this module in a wiki page like {module module="directory_last_sites"}
.
Solutions:
- Check if the key "desc" exists within the array $module_params
- If the key exists, use its value for the variable $module_params['desc']
- If the key does not exist, set the variable $module_params['desc'] to the default value 'n'
To do this, I've added $module_params['desc'] = isset($module_params['desc']) ? $module_params['desc'] : 'n';
Edited by Baraka Kinywa