mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-56463 tool_mobile: Set object properties always in same order
There are differences in http://php.net/manual/en/function.list.php between PHP 5 and in PHP 7. They neither recommend to rely on the new order as it may change again in future.
This commit is contained in:
parent
96abc5f1cd
commit
b14a04e0a4
@ -166,8 +166,13 @@ class api {
|
||||
// First settings that anyone can deduce.
|
||||
$settings->fullname = external_format_string($SITE->fullname, $context->id);
|
||||
$settings->shortname = external_format_string($SITE->shortname, $context->id);
|
||||
list($settings->summary, $settings->summaryformat) = external_format_text($SITE->summary, $SITE->summaryformat,
|
||||
|
||||
// Return to a var instead of directly to $settings object because of differences between
|
||||
// list() in php5 and php7. {@link http://php.net/manual/en/function.list.php}
|
||||
$formattedsummary = external_format_text($SITE->summary, $SITE->summaryformat,
|
||||
$context->id);
|
||||
$settings->summary = $formattedsummary[0];
|
||||
$settings->summaryformat = $formattedsummary[1];
|
||||
$settings->frontpage = $CFG->frontpage;
|
||||
$settings->frontpageloggedin = $CFG->frontpageloggedin;
|
||||
$settings->maxcategorydepth = $CFG->maxcategorydepth;
|
||||
|
Loading…
x
Reference in New Issue
Block a user