summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rwxr-xr-xsystem/core/CodeIgniter.php2
-rw-r--r--system/core/Common.php2
-rwxr-xr-xsystem/core/Lang.php2
-rwxr-xr-xsystem/core/Output.php9
-rwxr-xr-xsystem/core/URI.php5
5 files changed, 9 insertions, 11 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index cb5d439bd..7af3c485d 100755
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -267,7 +267,7 @@
$method = $RTR->fetch_method();
if ( ! class_exists($class)
- OR strpos($method, '_', 1) === 0
+ OR strpos($method, '_') === 0
OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller')))
)
{
diff --git a/system/core/Common.php b/system/core/Common.php
index 6ef229629..1f59c02d7 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -235,7 +235,7 @@ if ( ! function_exists('get_config'))
}
// Is the config file in the environment folder?
- if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT..'/config.php'))
+ if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
{
$file_path = APPPATH.'config/config.php';
}
diff --git a/system/core/Lang.php b/system/core/Lang.php
index 088cb6c9c..c40a6856e 100755
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -130,7 +130,7 @@ class CI_Lang {
}
$this->is_loaded[] = $langfile;
- $this->language = $this->language + $lang;
+ $this->language = array_merge($this->language, $lang);
unset($lang);
log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile);
diff --git a/system/core/Output.php b/system/core/Output.php
index 1beee734f..abd8a0ea9 100755
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -129,7 +129,6 @@ class CI_Output {
*
* Sets the output string
*
- * @access public
* @param string
* @return void
*/
@@ -282,7 +281,7 @@ class CI_Output {
* @param integer
* @return void
*/
- publi function cache($time)
+ public function cache($time)
{
$this->cache_expiration = ( ! is_numeric($time)) ? 0 : $time;
return $this;
@@ -397,15 +396,13 @@ class CI_Output {
// If the output data contains closing </body> and </html> tags
// we will remove them and add them back after we insert the profile data
- $output = preg_replace('|</body>.*?</html>|is', '', $output, $count).$CI->profiler->run();
+ $output = preg_replace('|</body>.*?</html>|is', '', $output, -1, $count).$CI->profiler->run();
if ($count > 0)
{
$output .= '</body></html>';
}
}
- // --------------------------------------------------------------------
-
// Does the controller contain a function named _output()?
// If so send the output there. Otherwise, echo it.
if (method_exists($CI, '_output'))
@@ -414,7 +411,7 @@ class CI_Output {
}
else
{
- echo $output; // Send it to the browser!
+ echo $output; // Send it to the browser!
}
log_message('debug', 'Final output sent to browser');
diff --git a/system/core/URI.php b/system/core/URI.php
index eaf7b752b..b28ee198b 100755
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -186,11 +186,12 @@ class CI_URI {
return '';
}
- if (strpos($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME']) === 0)
+ $uri = $_SERVER['REQUEST_URI'];
+ if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)
{
$uri = substr($uri, strlen($_SERVER['SCRIPT_NAME']));
}
- elseif (strpos($_SERVER['REQUEST_URI'], dirname($_SERVER['SCRIPT_NAME'])) === 0)
+ elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
{
$uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
}