Fixed undefined index when reservation_url not available.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Feb 2018 19:44:37 +0000 (14:44 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 26 Feb 2018 19:44:37 +0000 (14:44 -0500)
classes/data/dataMemberInfo.php

index 3b4731f..1f41db4 100644 (file)
@@ -558,16 +558,16 @@ class GlmDataMemberInfo extends GlmDataAbstract
             }
         }
 
-        // Only run these tests for 'l' (getList), 'g' (getEntry), 'e' (editEntry), 'u' (updateEntry)
+        // Don't run the following tests for 'l' (getList), 'g' (getEntry), 'e' (editEntry), 'u' (updateEntry)
         if ($a != 'l' && $a != 'g' && $a != 'e' && $a != 'u') {
             return $r;
         }
 
         // Check that URLs have http:// in front of them.
-        if (strtolower(substr($r['url'],0,4)) != 'http') {
+        if (isset($r['url']) && strtolower(substr($r['url'],0,4)) != 'http') {
             $r['url'] = 'http://'.$r['url'];
         }
-        if (strtolower(substr($r['reservation_url'],0,4)) != 'http') {
+        if (isset($r['reservation_url']) && strtolower(substr($r['reservation_url'],0,4)) != 'http') {
             $r['reservation_url'] = 'http://'.$r['reservation_url'];
         }