Skip to content

Commit a7c45e9

Browse files
Merge pull request chriskacerguis#379 from m7moud/master
Fix the check if a file extension is used
2 parents f0d856c + a1f9664 commit a7c45e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

application/libraries/REST_Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ protected function _detect_output_format()
565565
}
566566

567567
// Check if a file extension is used
568-
elseif ($this->_get_args and !is_array(end($this->_get_args)) and preg_match($pattern, end($this->_get_args), $matches)) {
568+
elseif ($this->_get_args and !is_array(end($this->_get_args)) and preg_match($pattern, end(array_keys($this->_get_args)), $matches)) {
569569
// The key of the last argument
570570
$last_key = end(array_keys($this->_get_args));
571571

0 commit comments

Comments
 (0)