summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-12-03 16:53:14 +0100
committerAndrey Andreev <narf@devilix.net>2015-12-03 16:53:14 +0100
commita18c6097a38f7b3eac789b5c217a97d7ac0b7085 (patch)
tree20f9a0b0d5ec434118fcf95971353c35df5b64b5
parent5734cb3cc59ca938112e981b9ebd27ba5bb69173 (diff)
Fix #4283
-rw-r--r--system/helpers/string_helper.php3
-rw-r--r--user_guide_src/source/changelog.rst3
2 files changed, 4 insertions, 2 deletions
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 637835160..3138a04b3 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -270,7 +270,7 @@ if ( ! function_exists('alternator'))
* @param string (as many parameters as needed)
* @return string
*/
- function alternator($args)
+ function alternator()
{
static $i;
@@ -279,6 +279,7 @@ if ( ! function_exists('alternator'))
$i = 0;
return '';
}
+
$args = func_get_args();
return $args[($i++ % count($args))];
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 5b7f225a5..a7807aa03 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -16,12 +16,13 @@ Bug fixes for 3.0.4
-------------------
- Fixed a bug (#4212) - :doc:`Query Builder <database/query_builder>` method ``count_all_results()`` could fail if an ``ORDER BY`` condition is used.
-- Fixed a bug where :doc:`Form Helper <helpers/form_helper>` functions `set_checkbox()`, `set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked".
+- Fixed a bug where :doc:`Form Helper <helpers/form_helper>` functions :php:func:`set_checkbox()`, :php:func:`set_radio()` didn't "uncheck" inputs on a submitted form if the default state is "checked".
- Fixed a bug (#4217) - :doc:`Config Library <libraries/config>` method ``base_url()`` didn't use proper formatting for IPv6 when it falls back to ``$_SERVER['SERVER_ADDR']``.
- Fixed a bug where :doc:`CAPTCHA Helper <helpers/captcha_helper>` entered an infinite loop while generating a random string.
- Fixed a bug (#4223) - :doc:`Database <database/method>` method ``simple_query()`` blindly executes queries without checking if the connection was initialized properly.
- Fixed a bug (#4244) - :doc:`Email Library <libraries/email>` could improperly use "unsafe" US-ASCII characters during Quoted-printable encoding.
- Fixed a bug (#4245) - :doc:`Database Forge <database/forge>` couldn't properly handle ``SET`` and ``ENUM`` type fields with string values.
+- Fixed a bug (#4283) - :doc:`String Helper <helpers/string_helper>` function :php:func:`alternator()` couldn't be called without arguments.
Version 3.0.3
=============