From: sam_marshall Date: Fri, 23 May 2008 10:30:47 +0000 (+0000) Subject: MDL-14965: Pass-by-reference call broke install on php5 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2d80e3882e6c88cefe9c32404427cccc7f41610a;p=moodle.git MDL-14965: Pass-by-reference call broke install on php5 --- diff --git a/admin/index.php b/admin/index.php index bdf0af2ea7..9b88944c8d 100644 --- a/admin/index.php +++ b/admin/index.php @@ -499,9 +499,11 @@ //add admin_tree block to site if not already present if ($admintree = $DB->get_record('block', array('name'=>'admin_tree'))) { $page = page_create_object(PAGE_COURSE_VIEW, SITEID); - blocks_execute_action($page, blocks_get_by_page($page), 'add', (int)$admintree->id, false, false); + $pageblocks=blocks_get_by_page($page); + blocks_execute_action($page, $pageblocks, 'add', (int)$admintree->id, false, false); if ($admintreeinstance = $DB->get_record('block_instance', array('pagetype'=>$page->type, 'pageid'=>SITEID, 'blockid'=>$admintree->id))) { - blocks_execute_action($page, blocks_get_by_page($page), 'moveleft', $admintreeinstance, false, false); + $pageblocks=blocks_get_by_page($page); + blocks_execute_action($page, $pageblocks, 'moveleft', $admintreeinstance, false, false); } }