Huge rewrite of default parameters, ext-network continued:
[mailer.git] / inc / modules / member / what-categories.php
index 66f6981b8c64e25d65e489d91414d3b65c74ef21..df72cb5d3ddbb9a8ec5d902eebd8984353547311 100644 (file)
@@ -56,7 +56,7 @@ $cats = SQL_NUMROWS($result);
 if ($cats > 0) {
        $LEAST = false;
        if (isFormSent()) {
-               $cnt = 0;
+               $cnt = '0';
                foreach (postRequestElement('cat') as $cat => $joined) {
                        if ($joined != 'Y') $cnt++;
                } // END - foreach
@@ -70,7 +70,7 @@ if ($cats > 0) {
        // Is the form sent?
        if (isFormSent()) {
                // Start counting all
-               $cnt = 0;
+               $cnt = '0';
 
                // Go through all entries
                foreach (postRequestElement('cat') as $cat => $joined) {
@@ -83,7 +83,7 @@ if ($cats > 0) {
                                        $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1",
                                                array($UID, bigintval($cat)), __FILE__, __LINE__);
 
-                                       if (SQL_NUMROWS($result_user) == 0) {
+                                       if (SQL_NUMROWS($result_user) == '0') {
                                                $sql = "INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES ('%s','%s')";
                                        } // END - if