Alex Trofimov 10 лет назад
Родитель
Сommit
5f55dce965
38 измененных файлов с 61 добавлено и 61 удалено
  1. 1 1
      inc/classes/BxDolCacheAPC.php
  2. 2 2
      inc/classes/BxDolCacheFile.php
  3. 2 2
      inc/classes/BxDolCacheUtilities.php
  4. 1 1
      inc/classes/BxDolCmts.php
  5. 2 2
      inc/classes/BxDolFormQuery.php
  6. 2 2
      inc/classes/BxDolGrid.php
  7. 1 1
      inc/classes/BxDolGridQuery.php
  8. 1 1
      inc/classes/BxDolImageResize.php
  9. 1 1
      inc/classes/BxDolMetatags.php
  10. 1 1
      inc/classes/BxDolPermalinks.php
  11. 1 1
      inc/classes/BxDolStorage.php
  12. 1 1
      inc/classes/BxDolTranscoder.php
  13. 1 1
      inc/classes/BxDolUploader.php
  14. 10 10
      inc/utils.inc.php
  15. 1 1
      member.php
  16. 2 2
      modules/base/notifications/classes/BxBaseModNotificationsModule.php
  17. 1 1
      modules/base/payment/classes/BxBaseModPaymentConfig.php
  18. 2 2
      modules/base/text/classes/BxBaseModTextTemplate.php
  19. 1 1
      modules/boonex/albums/classes/BxAlbumsFormEntry.php
  20. 2 2
      modules/boonex/albums/classes/BxAlbumsTemplate.php
  21. 1 1
      modules/boonex/antispam/classes/BxAntispamDNSURIBlacklists.php
  22. 1 1
      modules/boonex/oauth2/classes/BxOAuthModule.php
  23. 1 1
      modules/boonex/payment/classes/BxPaymentConfig.php
  24. 1 1
      modules/boonex/payment/classes/BxPaymentProviderChargebee.php
  25. 4 4
      modules/boonex/payment/classes/BxPaymentProviderPayPal.php
  26. 1 1
      modules/boonex/payment/classes/BxPaymentProviderRecurly.php
  27. 2 2
      modules/boonex/payment/classes/BxPaymentProviderStripe.php
  28. 2 2
      modules/boonex/sites/classes/BxSitesPaypal.php
  29. 1 1
      modules/boonex/smtpmailer/classes/BxSMTPModule.php
  30. 1 1
      modules/boonex/timeline/classes/BxTimelineConfig.php
  31. 2 2
      studio/classes/BxDolStudioToolsAudit.php
  32. 1 1
      studio/classes/BxDolStudioUpdater.php
  33. 1 1
      studio/template/scripts/BxBaseStudioFormsField.php
  34. 2 2
      template/scripts/BxBaseCmts.php
  35. 1 1
      template/scripts/BxBaseFormView.php
  36. 1 1
      template/scripts/BxBaseGrid.php
  37. 1 1
      template/scripts/BxBaseMetatags.php
  38. 1 1
      template/scripts/BxBaseRss.php

+ 1 - 1
inc/classes/BxDolCacheAPC.php

@@ -85,7 +85,7 @@ class BxDolCacheAPC extends BxDolCache
         if (isset($aKeys['cache_list']) && is_array($aKeys['cache_list'])) {
             foreach ($aKeys['cache_list'] as $r) {
                 $sKey = $r['info'];
-                if (0 == strncmp($sKey, $s, $l))
+                if (0 === strncmp($sKey, $s, $l))
                     $this->delData($sKey);
             }
         }

+ 2 - 2
inc/classes/BxDolCacheFile.php

@@ -87,7 +87,7 @@ class BxDolCacheFile extends BxDolCache
 
         $l = strlen($s);
         while (($sFile = readdir($rHandler)) !== false)
-            if (0 == strncmp($sFile, $s, $l))
+            if (0 === strncmp($sFile, $s, $l))
                 @unlink ($this->sPath . $sFile);
 
         closedir($rHandler);
@@ -106,7 +106,7 @@ class BxDolCacheFile extends BxDolCache
         $iSize = 0;
         $l = strlen($s);
         while (($sFile = readdir($rHandler)) !== false)
-            if (0 == strncmp($sFile, $s, $l))
+            if (0 === strncmp($sFile, $s, $l))
                 $iSize += @filesize ($this->sPath . $sFile);
 
         closedir($rHandler);

+ 2 - 2
inc/classes/BxDolCacheUtilities.php

@@ -94,7 +94,7 @@ class BxDolCacheUtilities extends BxDol
 
         $l = strlen($sPrefix);
         while (($sFile = readdir($rHandler)) !== false)
-            if (0 == strncmp($sFile, $sPrefix, $l))
+            if (0 === strncmp($sFile, $sPrefix, $l))
                 @unlink($sPath . $sFile);
 
         closedir($rHandler);
@@ -115,7 +115,7 @@ class BxDolCacheUtilities extends BxDol
         $iSize = 0;
         $l = strlen($sPrefix);
         while (($sFile = readdir($rHandler)) !== false)
-            if (0 == strncmp($sFile, $sPrefix, $l))
+            if (0 === strncmp($sFile, $sPrefix, $l))
                 $iSize += filesize($sPath . $sFile);
 
         closedir($rHandler);

+ 1 - 1
inc/classes/BxDolCmts.php

@@ -572,7 +572,7 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable
     {
         $aSystems = self::getSystems();
         foreach($aSystems as $sSystem => $aSystem) {
-            if (0 != strncasecmp($sModuleName, $sSystem, strlen($sModuleName)))
+            if (0 !== strncasecmp($sModuleName, $sSystem, strlen($sModuleName)))
                 continue;
 
             $o = self::getObjectInstance($sSystem, 0);

+ 2 - 2
inc/classes/BxDolFormQuery.php

@@ -62,7 +62,7 @@ class BxDolFormQuery extends BxDolDb
         $aForm['form_attrs'] = array_merge($aDefaultsFormAttrs, !empty($aAddFormAttrs) && is_array($aAddFormAttrs) ? $aAddFormAttrs : array());
 
         // form action
-        if (!empty($aForm['form_attrs']['action']) && 0 != strncasecmp($aForm['form_attrs']['action'], 'http://', 7) && 0 != strncasecmp($aForm['form_attrs']['action'], 'https://', 8))
+        if (!empty($aForm['form_attrs']['action']) && 0 !== strncasecmp($aForm['form_attrs']['action'], 'http://', 7) && 0 !== strncasecmp($aForm['form_attrs']['action'], 'https://', 8))
             $aForm['form_attrs']['action'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($aForm['form_attrs']['action']);
 
         // params
@@ -117,7 +117,7 @@ class BxDolFormQuery extends BxDolDb
                 $aInput['value'] = isset(self::$TYPES_TRANSLATABLE[$aInput['type']]) ? _t($a['value']) : $a['value'];
 
             if (!empty($a['values'])) {
-                if (0 == strncmp(BX_DATA_LISTS_KEY_PREFIX, $a['values'], 2)) {
+                if (0 === strncmp(BX_DATA_LISTS_KEY_PREFIX, $a['values'], 2)) {
                     $aInput['values_list_name'] = trim($a['values'], BX_DATA_LISTS_KEY_PREFIX . ' ');
                     $aInput['values'] = self::getDataItems(trim($a['values'], BX_DATA_LISTS_KEY_PREFIX . ' '), isset(self::$TYPES_SET[$aInput['type']]));
                 } else {

+ 2 - 2
inc/classes/BxDolGrid.php

@@ -367,7 +367,7 @@ class BxDolGrid extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
         $iSortDir = 1;
         if ($sOrderField && !empty($this->_aOptions['sorting_fields']) && is_array($this->_aOptions['sorting_fields']) && in_array($sOrderField, $this->_aOptions['sorting_fields'])) { // explicit order
             $sSortField = $sOrderField;
-            $iSortDir = 0 == strcasecmp($sOrderDir, 'desc') ? -1 : 1;
+            $iSortDir = 0 === strcasecmp($sOrderDir, 'desc') ? -1 : 1;
         } elseif (!empty($this->_aOptions['field_order'])) { // order by "order" field
             $sSortField = $this->_aOptions['field_order'];
         }
@@ -474,7 +474,7 @@ class BxDolGrid extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
 
         if ($sOrderField && is_array($this->_aOptions['sorting_fields']) && in_array($sOrderField, $this->_aOptions['sorting_fields'])) { // explicit order
 
-            $sDir = (0 == strcasecmp($sOrderDir, 'desc') ? 'DESC' : 'ASC');
+            $sDir = (0 === strcasecmp($sOrderDir, 'desc') ? 'DESC' : 'ASC');
 
             if (is_array($this->_aOptions['sorting_fields_translatable']) && in_array($sOrderField, $this->_aOptions['sorting_fields_translatable'])) {
 

+ 1 - 1
inc/classes/BxDolGridQuery.php

@@ -30,7 +30,7 @@ class BxDolGridQuery extends BxDolDb
             return false;
 
         // paginate
-        if (!empty($aObject['paginate_url']) && 0 != strncasecmp($aObject['paginate_url'], 'http://', 7) && 0 != strncasecmp($aObject['paginate_url'], 'https://', 8))
+        if (!empty($aObject['paginate_url']) && 0 !== strncasecmp($aObject['paginate_url'], 'http://', 7) && 0 !== strncasecmp($aObject['paginate_url'], 'https://', 8))
             $aObject['paginate_url'] = BX_DOL_URL_ROOT . $aObject['paginate_url'];
 
         // filter

+ 1 - 1
inc/classes/BxDolImageResize.php

@@ -10,7 +10,7 @@
 spl_autoload_register(function ($sClass) {
     // autoload Intervention Image files
     $sClass = trim($sClass, '\\');
-    if (0 == strncmp('Intervention', $sClass, 12)) {
+    if (0 === strncmp('Intervention', $sClass, 12)) {
         $sFile = BX_DIRECTORY_PATH_PLUGINS . 'intervention-image/' . str_replace('\\', '/', $sClass) . '.php';
         if (file_exists($sFile))
             require_once($sFile);

+ 1 - 1
inc/classes/BxDolMetatags.php

@@ -334,7 +334,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
             return $s;
     
         foreach ($a as $sKeyword)
-            if (0 == strcasecmp(mb_strtolower($s), mb_strtolower($sKeyword)))
+            if (0 === strcasecmp(mb_strtolower($s), mb_strtolower($sKeyword)))
                 $s = '<a rel="tag" href="' . BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword) . '">' . $sKeyword . '</a>';
 
         return $s;

+ 1 - 1
inc/classes/BxDolPermalinks.php

@@ -198,7 +198,7 @@ class BxDolPermalinks extends BxDolDb implements iBxDolSingleton
      */
     function unpermalink($sLink, $isStripBaseUrl = true)
     {
-        if ($isStripBaseUrl && 0 == strncmp($sLink, BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)))
+        if ($isStripBaseUrl && 0 === strncmp($sLink, BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)))
             $sLink = substr($sLink, strlen(BX_DOL_URL_ROOT));
 
         $sRet = null;

+ 1 - 1
inc/classes/BxDolStorage.php

@@ -834,7 +834,7 @@ abstract class BxDolStorage extends BxDolFactory implements iBxDolFactoryObject
             foreach ($aExts as $sExt) {
                 $sIcon = '';
                 foreach ($aIcons as $sIc => $if) {
-                    if (!(is_array($if) && in_array($sExt, $if)) && !(is_string($if) && 0 == strncmp($if, $sMimeType, strlen($if))))
+                    if (!(is_array($if) && in_array($sExt, $if)) && !(is_string($if) && 0 === strncmp($if, $sMimeType, strlen($if))))
                         continue;
                     $sIcon = $sIc;
                     break;

+ 1 - 1
inc/classes/BxDolTranscoder.php

@@ -535,7 +535,7 @@ class BxDolTranscoder extends BxDolFactory implements iBxDolFactoryObject
         if (!$a || $a['server'] != gethostname()) // deletion must be performed on the server where it was transcoded
             return false;
         
-        if ($a['file_id_result'] && $this->_sQueueStorage && 0 != strncmp($a['log'], $sErrMsg, strlen($sErrMsg))) {
+        if ($a['file_id_result'] && $this->_sQueueStorage && 0 !== strncmp($a['log'], $sErrMsg, strlen($sErrMsg))) {
             $oStorage = BxDolStorage::getObjectInstance($this->_sQueueStorage);
             if (!$oStorage->deleteFile($a['file_id_result'])) {
                 $this->_oDb->updateQueueStatus($mixedHandler, BX_DOL_QUEUE_FAILED, $sErrMsg . $this->getLog());

+ 1 - 1
inc/classes/BxDolUploader.php

@@ -327,7 +327,7 @@ abstract class BxDolUploader extends BxDolFactory
         foreach ($aGhosts as $aFile) {
             $sFileIcon = '';
 
-            if ($oImagesTranscoder && (0 == strncmp($aFile['mime_type'], 'image/', 6) || 0 == strncmp($aFile['mime_type'], 'video/', 6)))
+            if ($oImagesTranscoder && (0 === strncmp($aFile['mime_type'], 'image/', 6) || 0 === strncmp($aFile['mime_type'], 'video/', 6)))
                 $sFileIcon = $oImagesTranscoder->getFileUrl($aFile['id']);
 
             if (!$sFileIcon)

+ 10 - 10
inc/utils.inc.php

@@ -639,22 +639,22 @@ function bx_import($sClassName, $mixedModule = array())
         return;
     }
 
-    if (0 == strncmp($sClassName, 'BxDol', 5)) {
-        if (0 == strncmp($sClassName, 'BxDolStudio', 11))
+    if (0 === strncmp($sClassName, 'BxDol', 5)) {
+        if (0 === strncmp($sClassName, 'BxDolStudio', 11))
             require_once(BX_DOL_DIR_STUDIO_CLASSES . $sClassName . '.php');
         else
             require_once(BX_DIRECTORY_PATH_CLASSES . $sClassName . '.php');
         return;
     }
 
-    if (0 == strncmp($sClassName, 'BxBase', 6)) {
-        if (0 == strncmp($sClassName, 'BxBaseMod', 9)) {
+    if (0 === strncmp($sClassName, 'BxBase', 6)) {
+        if (0 === strncmp($sClassName, 'BxBaseMod', 9)) {
             $aMatches = array();
             if (preg_match('/BxBaseMod([A-Z][a-z]+)/', $sClassName, $aMatches)) {
                 require_once(BX_DIRECTORY_PATH_MODULES . 'base/' . strtolower($aMatches[1]) . '/classes/' . $sClassName . '.php');
                 return;
             }
-        } if (0 == strncmp($sClassName, 'BxBaseStudio', 12)) {
+        } if (0 === strncmp($sClassName, 'BxBaseStudio', 12)) {
             require_once(BX_DOL_DIR_STUDIO_BASE . 'scripts/' . $sClassName . '.php');
             return;
         } else {
@@ -663,8 +663,8 @@ function bx_import($sClassName, $mixedModule = array())
         }
     }
 
-    if (0 == strncmp($sClassName, 'BxTempl', 7)) {
-        if(0 == strncmp($sClassName, 'BxTemplStudio', 13)) {
+    if (0 === strncmp($sClassName, 'BxTempl', 7)) {
+        if(0 === strncmp($sClassName, 'BxTemplStudio', 13)) {
             $sPath = BX_DIRECTORY_PATH_MODULES . BxDolStudioTemplate::getInstance()->getPath() . 'data/template/studio/scripts/' . $sClassName . '.php';
         } else {
             $sPath = BX_DIRECTORY_PATH_MODULES . BxDolTemplate::getInstance()->getPath() . 'data/template/system/scripts/' . $sClassName . '.php';
@@ -684,7 +684,7 @@ function bx_import($sClassName, $mixedModule = array())
  */
 function bx_autoload($sClassName)
 {
-    if (0 == strncmp($sClassName, 'BxDol', 5) || 0 == strncmp($sClassName, 'BxBase', 6) || 0 == strncmp($sClassName, 'BxTempl', 7))
+    if (0 === strncmp($sClassName, 'BxDol', 5) || 0 === strncmp($sClassName, 'BxBase', 6) || 0 === strncmp($sClassName, 'BxTempl', 7))
         bx_import($sClassName);
 }
 
@@ -1309,7 +1309,7 @@ function bx_check_redirect_to_correct_hostname ($bProcessRedirect = false)
     $aUrl = parse_url(BX_DOL_URL_ROOT);
     $iPortDefault = 'https' == $aUrl['scheme'] ? '443' : '80';
 
-    $bRedirectRequired = isset($_SERVER['HTTP_HOST']) && 0 != strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host']) && 0 != strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host'] . ':' . (!empty($aUrl['port']) ? $aUrl['port'] : $iPortDefault));
+    $bRedirectRequired = isset($_SERVER['HTTP_HOST']) && 0 !== strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host']) && 0 !== strcasecmp($_SERVER['HTTP_HOST'], $aUrl['host'] . ':' . (!empty($aUrl['port']) ? $aUrl['port'] : $iPortDefault));
 
     if ($bRedirectRequired && $bProcessRedirect) {
         $sPort = empty($aUrl['port']) || 80 == $aUrl['port'] || 443 == $aUrl['port'] ? '' : ':' . $aUrl['port'];
@@ -1450,7 +1450,7 @@ function bx_linkify($text, $sAttrs = '', $bHtmlSpecialChars = false)
         if (!preg_match('@^https?://@', $url))
             $url = 'http://'.$url;
 
-        if (strncmp(BX_DOL_URL_ROOT, $url, strlen(BX_DOL_URL_ROOT)) != 0) {
+        if (strncmp(BX_DOL_URL_ROOT, $url, strlen(BX_DOL_URL_ROOT)) !== 0) {
             $sAttrs .= ' target="_blank" ';
             if ($bAddNofollow)
                 $sAttrs .= ' rel="nofollow" ';

+ 1 - 1
member.php

@@ -36,7 +36,7 @@ if (isset($_POST['ID'])) { // login form is submitted
         $aAccount = bx_login($oAccount->id(), ($oForm->getCleanValue('rememberMe') ? true : false));
 
         $sUrlRelocate = $oForm->getCleanValue('relocate');
-        if (!$sUrlRelocate || 0 != strncmp($sUrlRelocate, BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)))
+        if (!$sUrlRelocate || 0 !== strncmp($sUrlRelocate, BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)))
             $sUrlRelocate = BX_DOL_ROLE_ADMIN == $oForm->getRole() ? BX_DOL_URL_STUDIO . 'launcher.php' : BX_DOL_URL_ROOT . 'member.php';
 
         BxDolTemplate::getInstance()->setPageNameIndex (BX_PAGE_TRANSITION);

+ 2 - 2
modules/base/notifications/classes/BxBaseModNotificationsModule.php

@@ -61,14 +61,14 @@ class BxBaseModNotificationsModule extends BxDolModule
 
 			$_sUnit = '_' . $aHandler['alert_unit'];
 			$sUnit = _t($_sUnit);
-			if(strcmp($_sUnit, $sUnit) == 0)
+			if(strcmp($_sUnit, $sUnit) === 0)
 				$sUnit = _t($sLangPrefix . '_alert_module_' . $aHandler['alert_unit']);
 
 			$sAction = '';
             if(!empty($aHandler['alert_action'])) {
             	$_sAction = '_' . $aHandler['alert_unit'] . '_alert_action_' . $aHandler['alert_action'];
             	$sAction = _t($_sAction);
-            	if(strcmp($_sAction, $sAction) == 0)
+            	if(strcmp($_sAction, $sAction) === 0)
 					$sAction = _t($sLangPrefix . '_alert_action_' . $aHandler['alert_action']);
 
             	$sAction = ' (' . $sAction . ')';

+ 1 - 1
modules/base/payment/classes/BxBaseModPaymentConfig.php

@@ -116,7 +116,7 @@ class BxBaseModPaymentConfig extends BxBaseModGeneralConfig
 		if(empty($sType) || !isset($this->CNF[$sType]))
 			return $sResult;
 
-		if(strncmp($this->CNF[$sType], BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)) == 0)
+		if(strncmp($this->CNF[$sType], BX_DOL_URL_ROOT, strlen(BX_DOL_URL_ROOT)) === 0)
 			$sResult = bx_append_url_params($this->CNF[$sType], $aParams);
 		else
 			$sResult = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->CNF[$sType], $aParams);

+ 2 - 2
modules/base/text/classes/BxBaseModTextTemplate.php

@@ -219,8 +219,8 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
 
         foreach ($aGhostFiles as $k => $a) {
 
-            $isImage = $oTranscoder && (0 == strncmp('image/', $a['mime_type'], 6)); // preview for images, transcoder object for preview must be defined
-            $isVideo = $aTranscodersVideo && (0 == strncmp('video/', $a['mime_type'], 6)); // preview for videos, transcoder object for video must be defined
+            $isImage = $oTranscoder && (0 === strncmp('image/', $a['mime_type'], 6)); // preview for images, transcoder object for preview must be defined
+            $isVideo = $aTranscodersVideo && (0 === strncmp('video/', $a['mime_type'], 6)); // preview for videos, transcoder object for video must be defined
             $sUrlOriginal = $oStorage->getFileUrlById($a['id']);
             $sImgPopupId = 'bx-messages-atachment-popup-' . $a['id'];
 

+ 1 - 1
modules/boonex/albums/classes/BxAlbumsFormEntry.php

@@ -30,7 +30,7 @@ class BxAlbumsFormEntry extends BxBaseModTextFormEntry
         $sExif = '';
         $aExif = false;
         $aFile = $oStorage->getFile($iFileId);
-        if (0 == strncmp('image/', $aFile['mime_type'], 6)) {
+        if (0 === strncmp('image/', $aFile['mime_type'], 6)) {
             $oImageReize = BxDolImageResize::getInstance();
 
             $oTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_BIG']);            

+ 2 - 2
modules/boonex/albums/classes/BxAlbumsTemplate.php

@@ -208,8 +208,8 @@ class BxAlbumsTemplate extends BxBaseModTextTemplate
         if (!$aFileInfo)
             return '';
 
-        $isImage = 0 == strncmp('image/', $aFileInfo['mime_type'], 6); // preview for images, transcoder object for preview must be defined
-        $isVideo = $aTranscodersVideo && (0 == strncmp('video/', $aFileInfo['mime_type'], 6)); // preview for videos, transcoder object for video must be defined
+        $isImage = 0 === strncmp('image/', $aFileInfo['mime_type'], 6); // preview for images, transcoder object for preview must be defined
+        $isVideo = $aTranscodersVideo && (0 === strncmp('video/', $aFileInfo['mime_type'], 6)); // preview for videos, transcoder object for video must be defined
 
         $sMediaTitle = bx_process_output($aMediaInfo['title']);
         $sMediaTitleAttr = bx_html_attribute($aMediaInfo['title']);

+ 1 - 1
modules/boonex/antispam/classes/BxAntispamDNSURIBlacklists.php

@@ -80,7 +80,7 @@ class BxAntispamDNSURIBlacklists extends BxDol
         $aUrls = array ();
         foreach ($aUrlsUniq as $sUrl) {
 
-            if (0 == strncasecmp('www.', $sUrl, 4))
+            if (0 === strncasecmp('www.', $sUrl, 4))
                 $sUrl = substr($sUrl, 4);
 
             $aZones = explode ('.', $sUrl);

+ 1 - 1
modules/boonex/oauth2/classes/BxOAuthModule.php

@@ -69,7 +69,7 @@ class BxOAuthModule extends BxDolModule
             $this->_oAPI = new BxOAuthAPI($this);
         }
 
-        if (!$sAction || !method_exists($this->_oAPI, $sAction) || 0 == strcasecmp('errorOutput', $sAction) || 0 == strcasecmp('output', $sAction)) {
+        if (!$sAction || !method_exists($this->_oAPI, $sAction) || 0 === strcasecmp('errorOutput', $sAction) || 0 === strcasecmp('output', $sAction)) {
             $this->_oAPI->errorOutput(404, 'not_found', 'No such API endpoint available');
             return;
         }

+ 1 - 1
modules/boonex/payment/classes/BxPaymentConfig.php

@@ -198,7 +198,7 @@ class BxPaymentConfig extends BxBaseModPaymentConfig
 
 	public function http2https($s)
     {
-    	if(strncmp($s, 'https://', 8) == 0)
+    	if(strncmp($s, 'https://', 8) === 0)
     		return $s;
 
         return 'https://' . bx_ltrim_str($s, 'http://');

+ 1 - 1
modules/boonex/payment/classes/BxPaymentProviderChargebee.php

@@ -238,7 +238,7 @@ class BxPaymentProviderChargebee extends BxBaseModPaymentProvider implements iBx
 
 		$fTransactionAmount = (float)$aTransaction['amount'] / 100;
 		$sTransactionCurrency = strtoupper($aTransaction['currency_code']);
-		if($this->_bCheckAmount && ((float)$aPending['amount'] != $fTransactionAmount || strcasecmp($this->_oModule->_oConfig->getDefaultCurrencyCode(), $sTransactionCurrency) != 0))
+		if($this->_bCheckAmount && ((float)$aPending['amount'] != $fTransactionAmount || strcasecmp($this->_oModule->_oConfig->getDefaultCurrencyCode(), $sTransactionCurrency) !== 0))
 			return false;
 
 		return $this->_oModule->registerPayment($aPending);

+ 4 - 4
modules/boonex/payment/classes/BxPaymentProviderPayPal.php

@@ -171,9 +171,9 @@ class BxPaymentProviderPayPal extends BxBaseModPaymentProvider implements iBxBas
                return $aResponse;
 
             array_walk($aResponse['content'], create_function('&$arg', "\$arg = trim(\$arg);"));
-            if(strcmp($aResponse['content'][0], "INVALID") == 0)
+            if(strcmp($aResponse['content'][0], "INVALID") === 0)
                 return array('code' => 7, 'message' => $this->_sLangsPrefix . 'pp_err_wrong_transaction');
-            else if(strcmp($aResponse['content'][0], "VERIFIED") != 0)
+            else if(strcmp($aResponse['content'][0], "VERIFIED") !== 0)
                 return array('code' => 8, 'message' => $this->_sLangsPrefix . 'pp_err_wrong_verification_status');
         }
          else if($iPrcType == PP_PRC_TYPE_PDT) {
@@ -183,9 +183,9 @@ class BxPaymentProviderPayPal extends BxBaseModPaymentProvider implements iBxBas
             if((int)$aResponse['code'] !== 0)
                return $aResponse;
 
-            if(strcmp($aResponse['content'][0], "FAIL") == 0)
+            if(strcmp($aResponse['content'][0], "FAIL") === 0)
                 return array('code' => 7, 'message' => $this->_sLangsPrefix . 'pp_err_wrong_transaction');
-            else if(strcmp($aResponse['content'][0], "SUCCESS") != 0)
+            else if(strcmp($aResponse['content'][0], "SUCCESS") !== 0)
                 return array('code' => 8, 'message' => $this->_sLangsPrefix . 'pp_err_wrong_verification_status');
 
             $aKeys = array();

+ 1 - 1
modules/boonex/payment/classes/BxPaymentProviderRecurly.php

@@ -281,7 +281,7 @@ class BxPaymentProviderRecurly extends BxBaseModPaymentProvider implements iBxBa
 
 		$fTransactionAmount = (float)$aTransaction['amount'] / 100;
 		$sTransactionCurrency = strtoupper($aTransaction['currency_code']);
-		if($this->_bCheckAmount && ((float)$aPending['amount'] != $fTransactionAmount || strcasecmp($this->_oModule->_oConfig->getDefaultCurrencyCode(), $sTransactionCurrency) != 0))
+		if($this->_bCheckAmount && ((float)$aPending['amount'] != $fTransactionAmount || strcasecmp($this->_oModule->_oConfig->getDefaultCurrencyCode(), $sTransactionCurrency) !== 0))
 			return false;
 
 		return $this->_oModule->registerPayment($aPending);

+ 2 - 2
modules/boonex/payment/classes/BxPaymentProviderStripe.php

@@ -252,7 +252,7 @@ class BxPaymentProviderStripe extends BxBaseModPaymentProvider implements iBxBas
             'type' => $aCard['funding'],
             'number' => _t('_bx_payment_strp_txt_card_number_mask', $aCard['last4']),
             'expires' => _t('_bx_payment_strp_txt_card_expires_mask', $aCard['exp_month'], $aCard['exp_year']),
-            'cvc' => _t(strcmp($aCard['cvc_check'], 'pass') == 0 ? '_bx_payment_strp_txt_card_cvc_passed' : '_bx_payment_txt_none'),
+            'cvc' => _t(strcmp($aCard['cvc_check'], 'pass') === 0 ? '_bx_payment_strp_txt_card_cvc_passed' : '_bx_payment_txt_none'),
         ));
     }
 
@@ -546,7 +546,7 @@ class BxPaymentProviderStripe extends BxBaseModPaymentProvider implements iBxBas
 
 		$fChargeAmount = (float)$oCharge->amount / 100;
 		$sChargeCurrency = strtoupper($oCharge->currency);
-		if($this->_bCheckAmount && ((float)$aPending['amount'] != $fChargeAmount || strcasecmp($this->_oModule->_oConfig->getDefaultCurrencyCode(), $sChargeCurrency) != 0))
+		if($this->_bCheckAmount && ((float)$aPending['amount'] != $fChargeAmount || strcasecmp($this->_oModule->_oConfig->getDefaultCurrencyCode(), $sChargeCurrency) !== 0))
 			return false;
 
 		return $this->_oModule->registerPayment($aPending);

+ 2 - 2
modules/boonex/sites/classes/BxSitesPaypal.php

@@ -412,12 +412,12 @@ class BxSitesPaypal
         $aLines = explode("\n", $sResponseContent);
         array_walk($aLines, create_function('&$arg', "\$arg = trim(\$arg);") );
 
-        if(strcmp($aLines[0], "INVALID") == 0) {
+        if(strcmp($aLines[0], "INVALID") === 0) {
             $this->sResultMessage = 'Transaction verification failed: ' . $sResponse;
             return false;
         }
 
-        if(strcmp($aLines[0], "VERIFIED") != 0) {
+        if(strcmp($aLines[0], "VERIFIED") !== 0) {
             $this->sResultMessage = 'No verification status received (' . $aLines[0] . '): ' . $sResponse;
             return false;
         }

+ 1 - 1
modules/boonex/smtpmailer/classes/BxSMTPModule.php

@@ -108,7 +108,7 @@ class BxSMTPModule extends BxDolModule
             'recipient' => $aRecipientInfo,
             'html'      => $isHtml,
         );
-        bx_alert('profile', 'send_mail', $aRecipientInfo ? $aRecipientInfo['ID'] : 0, '', $aAlertData);
+        bx_alert('profile', 'send_mail', $aRecipientInfo && isset($aRecipientInfo['ID']) ? $aRecipientInfo['ID'] : 0, '', $aAlertData);
         //--- create system event [ end ]
 
         return $iRet;

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -249,7 +249,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         $sUrl1 = trim($sUrl1, "/");
         $sUrl2 = trim($sUrl2, "/");
 
-        return strncmp($sUrl1, $sUrl2, strlen($sUrl1)) == 0;
+        return strncmp($sUrl1, $sUrl2, strlen($sUrl1)) === 0;
     }
 }
 

+ 2 - 2
studio/classes/BxDolStudioToolsAudit.php

@@ -386,7 +386,7 @@ class BxDolStudioToolsAudit extends BxDol
         $s .= $this->getBlock(_t('_sys_audit_php_accelerator'), $sAccel, $this->getMsgHTML(_t('_sys_audit_php_accelerator'), $aMessage));
 
         $sSapi = php_sapi_name();
-        if (0 == strcasecmp('cgi', $sSapi))
+        if (0 === strcasecmp('cgi', $sSapi))
             $aMessage = array('type' => BX_DOL_AUDIT_WARN, 'msg' => _t('_sys_audit_msg_php_setup_inefficient'));
         else
             $aMessage = array('type' => BX_DOL_AUDIT_OK);
@@ -497,7 +497,7 @@ class BxDolStudioToolsAudit extends BxDol
                 $bResult = ($mixedVal >= $a['val']);
                 break;
             case 'strcasecmp':
-                $bResult = 0 == strcasecmp($mixedVal, $a['val']);
+                $bResult = 0 === strcasecmp($mixedVal, $a['val']);
                 break;
             case '=':
             default:

+ 1 - 1
studio/classes/BxDolStudioUpdater.php

@@ -56,7 +56,7 @@ class BxDolStudioUpdater extends BxDolStudioInstaller
                 'result' => false
             ));
 
-		if(isset($aParams['module_name']) && strcmp($aParams['module_name'], $aModuleInfo['name']) != 0)
+		if(isset($aParams['module_name']) && strcmp($aParams['module_name'], $aModuleInfo['name']) !== 0)
 			return array_merge($aResult, array(
                 'message' => $this->_displayResult('check_module_matches', false, '_adm_err_modules_module_not_match', $bHtmlResponce),
                 'result' => false

+ 1 - 1
studio/template/scripts/BxBaseStudioFormsField.php

@@ -153,7 +153,7 @@ class BxBaseStudioFormsField extends BxDolStudioFormsField
             if($oForm->update((int)$this->aField['id']) === false)
                 return false;
 
-			if($bAlter || strcmp($sInputNameOld, $sInputNameNew) != 0)
+			if($bAlter || strcmp($sInputNameOld, $sInputNameNew) !== 0)
 				$this->alterChange($sInputNameOld, $sInputNameNew);
 
             return true;

+ 2 - 2
template/scripts/BxBaseCmts.php

@@ -222,8 +222,8 @@ class BxBaseCmts extends BxDolCmts
                 $oTranscoder = BxDolTranscoderImage::getObjectInstance($this->getTranscoderPreviewName());
 
                 foreach($aFiles as $aFile) {
-                	$bImage = strncmp($aFile['mime_type'], 'image/', 6) == 0;
-                	$bVideo = strncmp($aFile['mime_type'], 'video/', 6) == 0;
+                	$bImage = strncmp($aFile['mime_type'], 'image/', 6) === 0;
+                	$bVideo = strncmp($aFile['mime_type'], 'video/', 6) === 0;
 
                 	$sPreview = '';
                 	if($oTranscoder && ($bImage || $bVideo))

+ 1 - 1
template/scripts/BxBaseFormView.php

@@ -1129,7 +1129,7 @@ BLAH;
         $isManualInput = (int)(isset($aInput['manual_input']) && $aInput['manual_input']);
         $sIdStatus = $this->getInputId($aInput) . '_status';
         $sIdInput = $this->getInputId($aInput) . '_location';
-        $sProto = (0 == strncmp('https', BX_DOL_URL_ROOT, 5)) ? 'https' : 'http';
+        $sProto = (0 === strncmp('https', BX_DOL_URL_ROOT, 5)) ? 'https' : 'http';
         $this->oTemplate->addJs($sProto . '://maps.google.com/maps/api/js?libraries=places&language=' . bx_lang_name() . '&key=' . trim(getParam('sys_maps_api_key')));
 
         $aVars = array (

+ 1 - 1
template/scripts/BxBaseGrid.php

@@ -108,7 +108,7 @@ class BxBaseGrid extends BxDolGrid
 
         $sFilter = bx_unicode_urldecode(bx_process_input(bx_get('filter')));
         $sOrderField = bx_unicode_urldecode(bx_process_input(bx_get('order_field')));
-        $sOrderDir = 0 == strcasecmp('desc', bx_get('order_dir')) ? 'DESC' : 'ASC';
+        $sOrderDir = 0 === strcasecmp('desc', bx_get('order_dir')) ? 'DESC' : 'ASC';
 
         if ($this->_aOptions['paginate_get_start'])
             $iStart = (int)bx_get($this->_aOptions['paginate_get_start']);

+ 1 - 1
template/scripts/BxBaseMetatags.php

@@ -85,7 +85,7 @@ class BxBaseMetatags extends BxDolMetatags
 
 		$sMapKey = trim(getParam('sys_maps_api_key'));
         $sLocationEncoded = rawurlencode(strip_tags($sLocationHtml));
-        $sProto = (0 == strncmp('https', BX_DOL_URL_ROOT, 5)) ? 'https' : 'http';
+        $sProto = (0 === strncmp('https', BX_DOL_URL_ROOT, 5)) ? 'https' : 'http';
         $iScale = isset($_COOKIE['devicePixelRatio']) && (int)$_COOKIE['devicePixelRatio'] >= 2 ? 2 : 1;
         $sLang = bx_lang_name();
 

+ 1 - 1
template/scripts/BxBaseRss.php

@@ -42,7 +42,7 @@ class BxBaseRss extends BxDolRss
     	$sUrl = bx_replace_markers($sUrl, $aMarkers);
 
 		header('Content-Type: text/xml; charset=utf-8');
-		return bx_file_get_contents($sUrl . (defined('BX_PROFILER') && BX_PROFILER && 0 == strncmp(BX_DOL_URL_ROOT, $sUrl, strlen(BX_DOL_URL_ROOT)) ? '&bx_profiler_disable=1' : ''));
+		return bx_file_get_contents($sUrl . (defined('BX_PROFILER') && BX_PROFILER && 0 === strncmp(BX_DOL_URL_ROOT, $sUrl, strlen(BX_DOL_URL_ROOT)) ? '&bx_profiler_disable=1' : ''));
     }
 
 	/**