summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-07-22 11:46:16 +0200
committerAndrey Andreev <narf@devilix.net>2015-07-22 11:46:16 +0200
commit07355daccd7f2d0e1fbea3c6d9a9eab575aa9ad8 (patch)
treea328419686c33a8aab24f906f7e9e61c9db1bd31
parente1a94d30e2f30cee36f71c246136fb2db34d25df (diff)
Fix #3991
-rw-r--r--application/config/config.php2
-rw-r--r--system/core/Loader.php2
-rw-r--r--user_guide_src/source/changelog.rst1
3 files changed, 4 insertions, 1 deletions
diff --git a/application/config/config.php b/application/config/config.php
index f4ba70a4e..a4d883fab 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -480,6 +480,8 @@ $config['time_reference'] = 'local';
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
+| Note: You need to have eval() enabled for this to work.
+|
*/
$config['rewrite_short_tags'] = FALSE;
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 9205ad1b6..ea470dbad 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -905,7 +905,7 @@ class CI_Loader {
// If the PHP installation does not support short tags we'll
// do a little string replacement, changing the short tags
// to standard PHP echo statements.
- if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE && function_usable('eval'))
+ if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE)
{
echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path))));
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index d9903d2ef..b6ad14800 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -69,6 +69,7 @@ Bug fixes for 3.0.1
- Fixed a bug (#3752) - ``$routing['directory']`` overrides were not properly handled and always resulted in a 404 "Not Found" error.
- Fixed an internal bug (#3989) - :doc:`Query Builder <database/query_builder>` escaping logic where if field name escaping is force-disabled, would also treat values as fields in methods ``where()``, ``having()``, ``set()``, ``set_insert_batch()``, ``set_update_batch()``.
- Fixed a bug (#3279) - :doc:`Query Builder <database/query_builder>` methods ``update()`` and ``get_compiled_update()`` did double escaping on the table name if it was provided via ``from()``.
+- Fixed a bug (#3991) - ``$config['rewrite_short_tags']`` never worked due to ``function_exists('eval')`` always returning FALSE.
Version 3.0.0
=============