Skip to content

Commit

Permalink
minor changes php notice
Browse files Browse the repository at this point in the history
  • Loading branch information
VladsBitrix committed Nov 11, 2019
1 parent c3a1ef7 commit 293d5de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_once (__DIR__.'/settings.php');

/**
* @version 1.3
* @version 1.31
* define:
* C_REST_WEB_HOOK_URL = 'https://rest-api.bitrix24.com/rest/1/doutwqkjxgc3mgc1/' //url on creat Webhook
* or
Expand Down Expand Up @@ -83,7 +83,7 @@ protected static function callCurl($arParams)
$arSettings = static::getAppSettings();
if($arSettings !== false)
{
if($arParams[ 'this_auth' ] == 'Y')
if(isset($arParams[ 'this_auth' ]) && $arParams[ 'this_auth' ] == 'Y')
{
$url = 'https://oauth.bitrix.info/oauth/token/';
}
Expand Down Expand Up @@ -123,7 +123,7 @@ protected static function callCurl($arParams)
{
$info[ 'curl_error' ] = curl_error($obCurl);
}
if($arParams[ 'this_auth' ] != 'Y' && static::TYPE_TRANSPORT == 'xml')//auth only json support
if(static::TYPE_TRANSPORT == 'xml' && (!isset($arParams[ 'this_auth' ]) || $arParams[ 'this_auth' ] != 'Y'))//auth only json support
{
$result = $out;
}
Expand Down

0 comments on commit 293d5de

Please sign in to comment.