]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/yoomedia_functions.php
ext was missing, fixed error message
[mailer.git] / inc / libs / yoomedia_functions.php
index 19f8a773f5bd22e92419d2a34e11c56bb56722ed..1f67e9ba00dcc591630cd00b5a206c4ecd7fe9fa 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/10/2008 *
- * ===============                              Last change: 10/10/2008 *
+ * Mailer v0.2.1-FINAL                                Start: 10/10/2008 *
+ * ===================                          Last change: 10/10/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : yoomedia_functions.php                           *
@@ -67,7 +67,7 @@ function YOOMEDIA_TEST_CONFIG ($data) {
        $errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response);
 
        // Log the response if failed
-       if (count($response) == 0) {
+       if (count($response) == '0') {
                // Queries depleted (as we count here!)
                logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total'));
                $errorCode = -1;
@@ -84,11 +84,11 @@ function YOOMEDIA_TEST_CONFIG ($data) {
                $errorCode = -1;
        } else {
                // This is fine, because the result array is okay and the response code on element 8 is fine
-               $errorCode = 0;
+               $errorCode = '0';
        }
 
        // Do we have some data there?
-       return ($errorCode == 0);
+       return ($errorCode == '0');
 }
 
 // Queries the given Yoo!Media API 2.0 script
@@ -179,7 +179,7 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) {
        $dataArray = explode('|', $responseLine);
 
        // Now make the result array with two dimensions
-       $cnt = 0; $entry = 0;
+       $cnt = '0'; $entry = '0';
        foreach ($dataArray as $line) {
                // Add the line
                $result[$entry][yoomediaTranslateIndex($type, $cnt)] = $line;
@@ -188,7 +188,7 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) {
                if ($cnt == 6) {
                        // Then advance to next entry and reset counter
                        $entry++;
-                       $cnt = 0;
+                       $cnt = '0';
                } else {
                        // Count up
                        $cnt++;
@@ -247,7 +247,7 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) {
        }
 
        // Add dummy receiver to avoid notice
-       $data['receiver'] = 0;
+       $data['receiver'] = '0';
 
        // HTML or normal? (normal is default...)
        $type = 't';