Sfoglia il codice sorgente

Ticket #3289 - Points №3 and №4

AntonLV 5 anni fa
parent
commit
598c78cba0

+ 1 - 1
inc/classes/BxDolForm.php

@@ -1345,7 +1345,7 @@ class BxDolFormChecker
             $sCheckFunction = array($oChecker, 'check' . bx_gen_method_name($a['checker']['func']));
 
             if (is_callable($sCheckFunction))
-                $bool = call_user_func_array ($sCheckFunction, !empty($a['checker']['params']) ? array_merge(array($val), $a['checker']['params']) : array ($val));
+                $bool = call_user_func_array ($sCheckFunction, !empty($a['checker']['params']) ? array_merge(array($val), array_values($a['checker']['params'])) : array ($val));
             else
                 $bool = true;
 

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralDb.php

@@ -191,7 +191,7 @@ class BxBaseModGeneralDb extends BxDolModuleDb
 		return $this->query("DELETE FROM `" . $sTableName . "` WHERE `" . $sTableKey . "` = :content_id", array('content_id' => $iNestedId));
 	}
    
-    function getNestedBy($aParams = array(), $sTableName)
+    function getNestedBy($aParams, $sTableName)
     {
         $aMethod = array('name' => 'getAll', 'params' => array(0 => 'query', 1 => array()));
         $sSelectClause = $sJoinClause = $sWhereClause = $sOrderClause = $sLimitClause = "";

+ 4 - 1
modules/boonex/intercom/classes/BxIntercomModule.php

@@ -295,8 +295,11 @@ EOS;
      * Perform JSON request to the API endpoint and get JSON response
      * @return false on error
      */
-    protected function _request($sURI, $sMethod = 'GET', $aData = array(), &$sError)
+    protected function _request($sURI, $sMethod, $aData, &$sError)
     {
+        $sMethod = !empty($sMethod) ? $sMethod : 'GET';
+        $aData = !empty($aData) ? $aData : array();
+
         $sAppId = getParam('bx_intercom_option_app_id');
         $sApiKey = getParam('bx_intercom_option_api_key');
         if (!$sAppId || !$sApiKey) {

+ 4 - 1
modules/boonex/mailchimp/classes/BxMailchimpModule.php

@@ -271,8 +271,11 @@ class BxMailchimpModule extends BxDolModule
      * Perform JSON request to the API endpoint and get JSON response
      * @return false on error
      */
-    protected function _request($sURI, $sMethod = 'GET', $aData = array(), &$sError)
+    protected function _request($sURI, $sMethod, $aData, &$sError)
     {
+        $sMethod = !empty($sMethod) ? $sMethod : 'GET';
+        $aData = !empty($aData) ? $aData : array();
+
         $sApiKey = getParam('bx_mailchimp_option_api_key');
         if (!$sApiKey || !$this->sHostnameAPI) {
             $sError = "No API Key or hostname isn't configured";

+ 1 - 1
plugins/lessphp/Less.php

@@ -5482,7 +5482,7 @@ class Less_Tree_Directive extends Less_Tree{
 	public $debugInfo;
 	public $type = 'Directive';
 
-	public function __construct($name, $value = null, $rules, $index = null, $currentFileInfo = null, $debugInfo = null ){
+	public function __construct($name, $value, $rules, $index = null, $currentFileInfo = null, $debugInfo = null ){
 		$this->name = $name;
 		$this->value = $value;
 		if( $rules ){