From 7cd1459f3d58c51b99567b55373e1eea19ed87e5 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 7 Apr 2007 02:00:13 +0000 Subject: [PATCH] r1533: Apparently some systems don't like our pass-by-reference use of ProcessBugDataForDisplay(), so change it to be used with an assignment operation instead. Closes bug://report/78. --- docs/changes.txt | 1 + favorite.php | 2 +- index.php | 4 +++- search.php | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 898bfef..e4f7189 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -8,6 +8,7 @@ - Fixed: Some email roles would not get notified under certain circumstances because the list of users to notify was reset - Fixed: Errors would occurr on installation due to a problem with not loading all the data at the right time - Enhancement: The installer will now check to ensure that all the proper MySQL permissions are enabled +- Fixed: A PHP warning could be generated due to passing an argument by reference (bug://report/78) 1.2.0 Beta 2 =============================== diff --git a/favorite.php b/favorite.php index 0f2c73d..b3eb126 100644 --- a/favorite.php +++ b/favorite.php @@ -94,7 +94,7 @@ if ($_REQUEST['do'] == 'manage') while ($bug = $db->fetch_array($favorites)) { $funct->exec_swap_bg('altcolor', ''); - ProcessBugDataForDisplay(&$bug, $funct->bgcolour); + $bug = ProcessBugDataForDisplay($bug, $funct->bgcolour); $bugs .= $sort->constructRow($bug); } diff --git a/index.php b/index.php index a314ded..7daae74 100644 --- a/index.php +++ b/index.php @@ -34,6 +34,8 @@ $focus['index'] = 'focus'; require_once('./global.php'); require_once('./includes/class_sort.php'); +error_reporting(E_ALL & ~E_NOTICE); + if (!can_perform('canviewbugs')) { $message->errorPermission(); @@ -65,7 +67,7 @@ $bugs_fetch = $db->query($sort->fetch_sql_query(null, $pagination->fetchLimit($p while ($bug = $db->fetch_array($bugs_fetch)) { $funct->exec_swap_bg('altcolor', ''); - ProcessBugDataForDisplay(&$bug, $funct->bgcolour); + $bug = ProcessBugDataForDisplay($bug, $funct->bgcolour); $bugs .= $sort->constructRow($bug); } diff --git a/search.php b/search.php index 1a3fdb1..c16b69a 100644 --- a/search.php +++ b/search.php @@ -697,7 +697,7 @@ if ($_POST['do'] == 'results') while ($bug = $db->fetch_array($search)) { $funct->exec_swap_bg('altcolor', ''); - ProcessBugDataForDisplay(&$bug, $funct->bgcolour); + $bug = ProcessBugDataForDisplay($bug, $funct->bgcolour); $bugs .= $sort->constructRow($bug, "&hilight=$hilight"); } -- 2.22.5