diff --git a/src/com/zoho/crm/api/Initializer.php b/src/com/zoho/crm/api/Initializer.php index a7a9535..9f24fde 100755 --- a/src/com/zoho/crm/api/Initializer.php +++ b/src/com/zoho/crm/api/Initializer.php @@ -122,7 +122,7 @@ public static function initialize($user, $environment, $token, $store, $sdkConfi { if(is_null(self::$jsonDetails)) { - self::$jsonDetails = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); + self::$jsonDetails = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); } } catch (\Exception $ex) @@ -352,4 +352,4 @@ public function toString() { return Constants::FOR_EMAIL_ID . self::$initializer->getUser()->getEmail() . Constants::IN_ENVIRONMENT . self::$initializer->getEnvironment()->getUrl() . "."; } -} \ No newline at end of file +} diff --git a/src/com/zoho/crm/api/util/HeaderParamValidator.php b/src/com/zoho/crm/api/util/HeaderParamValidator.php index b7fdd40..eefec5f 100644 --- a/src/com/zoho/crm/api/util/HeaderParamValidator.php +++ b/src/com/zoho/crm/api/util/HeaderParamValidator.php @@ -60,7 +60,7 @@ public function getJSONDetails() if(is_null($json_Details)) { - $json_Details = json_decode(file_get_contents(explode("src", realpath(__DIR__))[0] . Constants::JSON_DETAILS_FILE_PATH), true); + $json_Details = json_decode(file_get_contents(join("src", explode("src", realpath(__DIR__), -1)) . Constants::JSON_DETAILS_FILE_PATH), true); Initializer::$jsonDetails = $json_Details; } @@ -131,4 +131,4 @@ public function checkDataType($keyDetail, $value) return $check; } -} \ No newline at end of file +}