Closed (fixed)
Project:
Customerror
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2012 at 21:48 UTC
Updated:
19 Aug 2014 at 13:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pbuyle commentedHere is a patch to fix this issue.
Comment #2
akshita commentedHi
will this patch fixes the issue at line 277
Notice: Undefined offset: 1 in customerror_check_redirect() (line 277 of /var/www/sites/all/modules/customerror/customerror.module).
Please do the needful and thanks in advance.
function customerror_check_redirect() {
$destination = $_GET['destination'];
if (empty($destination)) {
return;
}
$redirect_list = variable_get('customerror_redirect', '');
if (empty($redirect_list)) {
return;
}
$redirect_list = explode("\n", $redirect_list);
foreach ($redirect_list as $item) {
if (isset($src) && isset($dst)) {
$src = str_replace("/", "\\/", $src);
$dst = str_replace("\r", "", $dst);
// In case there are spaces in the URL, we escape them
$orig_dst = str_replace(" ", "%20", $destination);
if (preg_match('/' . $src . '/', $orig_dst)) {
$_GET['destination'] = $dst;
drupal_goto($dst);
}
}
}
}
Comment #3
superspring commentedI've tried mongolito404's patch, it fixes the problem.
Comment #4
gisleThanks!
Looks fine. It is commited on May 2, 2013 18:59 (commit 5941549 on 7.x-1.x branch).
Comment #7
nicholasthompsonI can see the commit this was fixed in - however the latest 7.x-1.2 release still has the bug in it... Has the code been reverted?
http://cgit.drupalcode.org/customerror/tree/customerror.module?id=7.x-1....
Comment #8
nicholasthompsonIgnore - my issue is slightly different...