Skip to content

Commit

Permalink
Merge branch 'wip-75283-m311' into MOODLE_311_STABLE
Browse files Browse the repository at this point in the history
# Conflicts:
#	local/o365/classes/feature/calsync/task/importfromoutlook.php
#	local/o365/classes/feature/sds/task/sync.php
#	local/o365/classes/feature/sds/utils.php
#	local/o365/classes/feature/usergroups/coursegroups.php
#	local/o365/classes/feature/usersync/main.php
#	local/o365/classes/observers.php
#	local/o365/classes/page/acp.php
#	local/o365/classes/rest/o365api.php
#	local/o365/classes/rest/unified.php
#	local/o365/classes/task/usersync.php
#	local/o365/classes/utils.php
#	local/o365/db/upgrade.php
#	local/o365/lib.php
#	local/o365/version.php
  • Loading branch information
weilai-irl committed Mar 25, 2022
2 parents 98885a0 + 24d1d3f commit 37e360f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions classes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ class utils {
*/
public static function process_json_response($response, array $expectedstructure = array()) {
$backtrace = debug_backtrace(0);
$callingclass = (isset($backtrace[1]['class'])) ? $backtrace[1]['class'] : '?';
$callingfunc = (isset($backtrace[1]['function'])) ? $backtrace[1]['function'] : '?';
$callingline = (isset($backtrace[0]['line'])) ? $backtrace[0]['line'] : '?';
$caller = $callingclass.'::'.$callingfunc.':'.$callingline;
$caller = __METHOD__ . ':' . $callingline;

$result = @json_decode($response, true);
if (empty($result) || !is_array($result)) {
Expand Down

0 comments on commit 37e360f

Please sign in to comment.