Просмотр исходного кода

#3764 - Categories/Hashtags: PHP notice on home page (conflict fix)

Alex Trofimov 4 лет назад
Родитель
Сommit
2b3adf499f
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      inc/utils.inc.php

+ 2 - 2
inc/utils.inc.php

@@ -941,7 +941,7 @@ function bx_file_get_contents($sFileUrl, $aParams = array(), $sMethod = 'get', $
         if ($aHeaders)
             curl_setopt($rConnect, CURLOPT_HTTPHEADER, $aHeaders);
 
-        if (0 === strpos($sFileUrl, BX_DOL_URL_ROOT)) {
+        if (defined('BX_DOL_URL_ROOT') && 0 === strpos($sFileUrl, BX_DOL_URL_ROOT)) {
             $sAllCookies = '';
             foreach($_COOKIE as $sKey => $mValue){
                 if(is_array($mValue)){
@@ -2119,7 +2119,7 @@ function bx_get_device_pixel_ratio()
  */
 function bx_log($sObject, $mixed)
 {
-    if ($o = BxDolLogs::getObjectInstance($sObject))
+    if (class_exists('BxDolLogs', true) && $o = BxDolLogs::getObjectInstance($sObject))
         return $o->add($mixed);
     else
         return false;