Skip to content

Commit 8bbcf0d

Browse files
f-tochriskacerguis
authored andcommitted
continuous-integration/styleci/pr corrections
continuous-integration/styleci/pr corrections
1 parent 1ec3b03 commit 8bbcf0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/RestController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,15 +631,15 @@ public function response($data = null, $http_code = null, $continue = false)
631631
// CORB protection
632632
// First, get the output content.
633633
$output = Format::factory($data)->{'to_'.$this->response->format}();
634-
634+
635635
// Set the format header
636636
// Then, check if the client asked for a callback, and if the output contains this callback :
637-
if (isset($this->_get_args['callback']) && $this->response->format == 'json' && preg_match('/^' . $this->_get_args['callback'] . '/', $output)) {
637+
if (isset($this->_get_args['callback']) && $this->response->format == 'json' && preg_match('/^'.$this->_get_args['callback'].'/', $output)) {
638638
$this->output->set_content_type($this->_supported_formats['jsonp'], strtolower($this->config->item('charset')));
639639
} else {
640640
$this->output->set_content_type($this->_supported_formats[$this->response->format], strtolower($this->config->item('charset')));
641641
}
642-
642+
643643
// An array must be parsed as a string, so as not to cause an array to string error
644644
// Json is the most appropriate form for such a data type
645645
if ($this->response->format === 'array') {

0 commit comments

Comments
 (0)