Ignore:
Timestamp:
Jul 13, 2017 1:50:49 PM (7 years ago)
Author:
anonymous
Message:

Fix undefined index errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/App.inc.php

    r604 r608  
    198198
    199199    if (isset($url) && is_string($url)) {
    200         // Delete any boomerang request keys in the query string.
    201         $url = preg_replace('/boomerang=[\w]+/', '', $url);
    202 
    203         if (is_array($_SESSION['_boomerang']['url']) && !empty($_SESSION['_boomerang']['url'])) {
     200        // Delete any boomerang request keys in the query string (along with any trailing delimiters after the deletion).
     201        $url = preg_replace(array('/([&?])boomerang=[^&?]+[&?]?/', '/[&?]$/'), array('$1', ''), $url);
     202
     203        if (isset($_SESSION['_boomerang']['url']) && is_array($_SESSION['_boomerang']['url']) && !empty($_SESSION['_boomerang']['url'])) {
    204204            // If the URL currently exists in the boomerang array, delete.
    205205            while ($existing_key = array_search($url, $_SESSION['_boomerang']['url'])) {
Note: See TracChangeset for help on using the changeset viewer.