Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-14965: Pass-by-reference call broke install on php5

  • Loading branch information...
commit 38147894daae64dbb4a81833b4cd9e74631f96ee 1 parent 9ff5163
authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  admin/index.php
6  admin/index.php
@@ -529,9 +529,11 @@
529 529
         //add admin_tree block to site if not already present
530 530
         if ($admintree = get_record('block', 'name', 'admin_tree')) {
531 531
             $page = page_create_object(PAGE_COURSE_VIEW, SITEID);
532  
-            blocks_execute_action($page, blocks_get_by_page($page), 'add', (int)$admintree->id, false, false);
  532
+            $pageblocks=blocks_get_by_page($page);
  533
+            blocks_execute_action($page, $pageblocks, 'add', (int)$admintree->id, false, false);
533 534
             if ($admintreeinstance = get_record('block_instance', 'pagetype', $page->type, 'pageid', SITEID, 'blockid', $admintree->id)) {
534  
-                blocks_execute_action($page, blocks_get_by_page($page), 'moveleft', $admintreeinstance, false, false);
  535
+                $pageblocks=blocks_get_by_page($page); // Needs to be re-got, since has just changed
  536
+                blocks_execute_action($page, $pageblocks, 'moveleft', $admintreeinstance, false, false);
535 537
             }
536 538
         }
537 539
 

0 notes on commit 3814789

Please sign in to comment.
Something went wrong with that request. Please try again.