Closed jadwigo closed 6 years ago
The statements in https://github.com/xiaohutai/jsonapi/blob/v2.2.1/src/Helpers/APIHelper.php#L379-L383 and https://github.com/xiaohutai/jsonapi/blob/v2.2.1/src/Response/ApiResponse.php#L58-L62 are not compatible with PHP 5.5
The could be replace by:
$headers = $this->config->getHeaders(); if (!empty($headers) && is_array($headers)) { foreach ($headers as $header => $value) { $this->headers->set($header, $value); } }
// Handle replacements. $replacements = $this->config->getReplacements(); if (!empty($replacements)) { foreach ($replacements as $from => $to) { $item = str_replace($from, $to, $item); } }
Danke schön! Sorry for the late reply, fixed in https://github.com/xiaohutai/jsonapi/commit/34477f9dfa10d7a9f2c9e440329cf8065fe34895
The statements in https://github.com/xiaohutai/jsonapi/blob/v2.2.1/src/Helpers/APIHelper.php#L379-L383 and https://github.com/xiaohutai/jsonapi/blob/v2.2.1/src/Response/ApiResponse.php#L58-L62 are not compatible with PHP 5.5
The could be replace by: