Skip to content

Commit ad6257d

Browse files
Merge pull request chriskacerguis#427 from Tjoosten/master
correct else if
2 parents 4c3b7c2 + fa5bf3c commit ad6257d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

application/libraries/Format.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function to_xml($data = NULL, $structure = NULL, $basenode = 'xml')
153153
}
154154
}
155155
// if there is another array found recursively call this function
156-
else if (is_array($value) || is_object($value))
156+
elseif (is_array($value) || is_object($value))
157157
{
158158
$node = $structure->addChild($key);
159159

@@ -266,7 +266,7 @@ public function to_json()
266266
}
267267

268268
// we only honour jsonp callback which are valid javascript identifiers
269-
else if (preg_match('/^[a-z_\$][a-z0-9\$_]*(\.[a-z_\$][a-z0-9\$_]*)*$/i', $callback))
269+
elseif (preg_match('/^[a-z_\$][a-z0-9\$_]*(\.[a-z_\$][a-z0-9\$_]*)*$/i', $callback))
270270
{
271271
// this is a jsonp request, the content-type must be updated to be text/javascript
272272
header("Content-Type: application/javascript");

application/libraries/REST_Controller.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ public function _remap($object_called, $arguments)
415415
}
416416

417417
// No key stuff, but record that stuff is happening
418-
else if (config_item('rest_enable_logging') and $log_method) {
418+
elseif (config_item('rest_enable_logging') and $log_method) {
419419
$this->_log_request($authorized = TRUE);
420420
}
421421

@@ -459,7 +459,7 @@ public function response($data = NULL, $http_code = NULL, $continue = FALSE)
459459
}
460460

461461
// If data is NULL but http code provided, keep the output empty
462-
else if ($data === NULL && is_numeric($http_code)) {
462+
elseif ($data === NULL && is_numeric($http_code)) {
463463
$output = NULL;
464464
}
465465

@@ -825,7 +825,7 @@ protected function _check_limit($controller_method)
825825
}
826826

827827
// Been an hour since they called
828-
else if ($result->hour_started < time() - (60 * 60)) {
828+
elseif ($result->hour_started < time() - (60 * 60)) {
829829
// Reset the started period
830830
$this->rest->db
831831
->where('uri', $this->uri->uri_string())

0 commit comments

Comments
 (0)