ソースを参照

Ticket #4971 - Build-in API support: Fix for PHP notices, warnings, etc.

AntonLV 4 ヶ月 前
親
コミット
fbef5fc3a4

+ 1 - 1
inc/classes/BxDolSearch.php

@@ -623,7 +623,7 @@ class BxDolSearchResult implements iBxDolReplaceable
             'per_page' => $this->aCurrent['paginate']['perPage'],
             'per_page' => $this->aCurrent['paginate']['perPage'],
             'start' => $this->aCurrent['paginate']['start'],
             'start' => $this->aCurrent['paginate']['start'],
             'type' => $this->_sMode,
             'type' => $this->_sMode,
-            'view' => $this->_aParams['unit_view']
+            'view' => $this->_aParams['unit_view'] ?? ''
         ];
         ];
         
         
         if ($sHomeUrl){
         if ($sHomeUrl){

+ 2 - 2
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -3775,8 +3775,8 @@ class BxBaseModGeneralModule extends BxDolModule
             $aBlock = BxDolPage::getBlockProcessing();
             $aBlock = BxDolPage::getBlockProcessing();
 
 
             $sContentType = 'browse';
             $sContentType = 'browse';
-            if(($sK = 'config_api') && $aBlock[$sK] && is_array($aBlock[$sK]))
-                $sContentType = $aBlock[$sK]['content_type'] ?? $sContentType;
+            if(($aConfigApi = $aBlock['config_api'] ?? false) && is_array($aConfigApi))
+                $sContentType = $aConfigApi['content_type'] ?? $sContentType;
 
 
             $bBrowseSimple = $sContentType == 'browse_simple';
             $bBrowseSimple = $sContentType == 'browse_simple';