Fixed some undefined reference messages.
authorChuck Scott <cscott@gaslightmedia.com>
Fri, 9 Sep 2016 20:30:48 +0000 (16:30 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Fri, 9 Sep 2016 20:30:48 +0000 (16:30 -0400)
classes/data/dataContacts.php
models/admin/contacts/index.php

index 03ca442..3770b74 100644 (file)
@@ -462,7 +462,7 @@ class GlmDataContacts extends GlmDataAbstract
         }
 
         // Only run these tests for insert and update
-        if ($this->postProcess && $_REQUEST['option'] == 'submit') {
+        if ($this->postProcess && isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') {
             if ($r['primary_contact']) {
                 $this->wpdb->query("UPDATE ".$this->table." SET primary_contact = false where id != ".$r['id'].";");
             }
index ff16e43..f9bf4ab 100644 (file)
@@ -120,6 +120,7 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts
         $limit = 20;        // Set to the number of listings per page
         $namesList = false;
 
+        $where = '';
 
         $validOptions = array(
             'create',
@@ -507,7 +508,7 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts
                 // Make sure option is set to list
                 $option = 'list';
 
-                $where = true;
+                $where = ' TRUE ';
 
                 // Only list member contacts for the selected member
                 if ($haveMember) {