We have moved to Github. Please open tickets there.

Opened 3 years ago

Closed 3 years ago

#1967 closed Defect (fixed)

remove purposeless call to array_merge in forward()

Reported by: tomv Owned by:
Priority: low Milestone: Elgg 1.7.1
Component: Core Version: 1.7
Severity: trivial Keywords:
Cc: brettp Difficulty:

Description

We get :

[Thu Mar 11 13:00:02 2010] [error] [client 85.17.94.37] WARNING: 2010-03-11 13:00:02 (CET): "array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array" in file /var/www/engine/lib/elgglib.php (line 31)

Code is:

line 31 is

$_SESSION[ 'msg' ] = array_merge($_SESSION[ 'msg' ], system_messages());

in this:

function forward($location = "") {

global $CONFIG;

if (!headers_sent()) {

$current_page = current_page_url();
What is this meant to do?
if (strpos($current_page, $CONFIG->wwwroot . "action") ===false)

$_SESSION[ 'msg' ] = array_merge($_SESSION[ 'msg' ], system_messages());
if ((substr_count($location, 'http://') == 0) && (substr_count($location, 'https://') == 0)) {

$location = $CONFIG->url . $location;

}

header("Location: {$location}");
exit;

}

return false;

}

Change History (2)

comment:1 Changed 3 years ago by cash

  • Milestone changed from Elgg 1.8 to Elgg 1.7.1
  • Severity changed from minor to trivial
  • Summary changed from Apache Warning to remove purposeless call to array_merge in forward()

messages are already cached in the session object so this call in forward() does nothing

comment:2 Changed 3 years ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

(In [svn:5533]) Fixes #1967 - cleans up forward()

Note: See TracTickets for help on using tickets.