summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/core/Common.php17
-rw-r--r--system/core/Output.php10
-rw-r--r--system/libraries/Session/drivers/Session_cookie.php2
-rw-r--r--system/libraries/Zip.php2
-rw-r--r--user_guide_src/source/changelog.rst6
5 files changed, 22 insertions, 15 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 7feb16bfd..c7ab387a3 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -681,17 +681,22 @@ if ( ! function_exists('function_usable'))
{
if ( ! isset($_suhosin_func_blacklist))
{
- $_suhosin_func_blacklist = extension_loaded('suhosin')
- ? array()
- : explode(',', trim(@ini_get('suhosin.executor.func.blacklist')));
+ if (extension_loaded('suhosin'))
+ {
+ $_suhosin_func_blacklist = explode(',', trim(@ini_get('suhosin.executor.func.blacklist')));
- if ( ! in_array('eval', $_suhosin_func_blacklist, TRUE) && @ini_get('suhosin.executor.disable_eval'))
+ if ( ! in_array('eval', $_suhosin_func_blacklist, TRUE) && @ini_get('suhosin.executor.disable_eval'))
+ {
+ $_suhosin_func_blacklist[] = 'eval';
+ }
+ }
+ else
{
- $_suhosin_func_blacklist[] = 'eval';
+ $_suhosin_func_blacklist = array();
}
}
- return in_array($function_name, $_suhosin_func_blacklist, TRUE);
+ return ! in_array($function_name, $_suhosin_func_blacklist, TRUE);
}
return FALSE;
diff --git a/system/core/Output.php b/system/core/Output.php
index 7a7380ce1..78eb8c654 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -780,6 +780,7 @@ class CI_Output {
break;
case 'text/css':
+ case 'text/javascript':
//Remove CSS comments
$output = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $output);
@@ -788,11 +789,12 @@ class CI_Output {
// semi-colons, parenthesis, commas
$output = preg_replace('!\s*(:|;|,|}|{|\(|\))\s*!', '$1', $output);
- break;
+ // Remove spaces
+ $output = preg_replace('/ /s', ' ', $output);
- case 'text/javascript':
+ // Remove breaklines and tabs
+ $output = preg_replace('/[\r\n\t]/', '', $output);
- // Currently leaves JavaScript untouched.
break;
default: break;
@@ -804,4 +806,4 @@ class CI_Output {
}
/* End of file Output.php */
-/* Location: ./system/core/Output.php */ \ No newline at end of file
+/* Location: ./system/core/Output.php */
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php
index 6d926ae3d..9392a4dbe 100644
--- a/system/libraries/Session/drivers/Session_cookie.php
+++ b/system/libraries/Session/drivers/Session_cookie.php
@@ -457,7 +457,7 @@ class CI_Session_cookie extends CI_Session_driver {
}
// No result? Kill it!
- if ($query->num_rows() === 0)
+ if (empty($query) OR $query->num_rows() === 0)
{
$this->sess_destroy();
return FALSE;
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 77cc45b38..740e99c72 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -133,7 +133,7 @@ class CI_Zip {
protected function _get_mod_time($dir)
{
// filemtime() may return false, but raises an error for non-existing files
- $date = file_exists($dir) ? filemtime($dir) : getdate($this->now);
+ $date = file_exists($dir) ? @filemtime($dir) : getdate($this->now);
return array(
'file_mtime' => ($date['hours'] << 11) + ($date['minutes'] << 5) + $date['seconds'] / 2,
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 61c79417c..a3d29056e 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -327,9 +327,9 @@ Bug fixes for 3.0
- Fixed a bug (#181) where a mis-spelling was in the form validation language file.
- Fixed a bug (#159, #163) that mishandled Query Builder nested transactions because _trans_depth was not getting incremented.
- Fixed a bug (#737, #75) - :doc:`Pagination <libraries/pagination>` anchor class was not set properly when using initialize method.
-- Fixed a bug (#419) - auto_link() now recognizes URLs that come after a word boundary.
-- Fixed a bug (#724) - is_unique in form validation now checks that you are connected to a database.
-- Fixed a bug (#647) - _get_mod_time() in Zip library no longer generates stat failed errors.
+- Fixed a bug (#419) - ``auto_link()`` now recognizes URLs that come after a word boundary.
+- Fixed a bug (#724) - :doc:`Form Validation Library <libraries/form_validation>` rule **is_unique** didn't check if a database connection exists.
+- Fixed a bug (#647) - :doc:`Zip Library <libraries/zip>` internal method ``_get_mod_time()`` didn't suppress possible "stat failed" errors generated by ``filemtime()``.
- Fixed a bug (#608) - Fixes an issue with the Image_lib class not clearing properties completely.
- Fixed a bug (#157, #174) - the Image_lib clear() function now resets all variables to their default values.
- Fixed a bug where using $this->dbforge->create_table() with PostgreSQL database could lead to fetching whole table.