summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/helpers/string_helper.php7
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/helpers/string_helper.rst3
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst10
4 files changed, 19 insertions, 2 deletions
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 4eee2a262..c5c493452 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -276,8 +276,11 @@ if ( ! function_exists('repeater'))
/**
* Repeater function
*
- * @param string
- * @param int number of repeats
+ * @todo Remove in version 3.1+.
+ * @deprecated 3.0.0 This is just an alias for PHP's native str_repeat()
+ *
+ * @param string $data String to repeat
+ * @param int $num Number of repeats
* @return string
*/
function repeater($data, $num = 1)
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index c37345933..e91fafccc 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -85,6 +85,7 @@ Release Date: Not Released
- Added an optional paramater to ``delete_files()`` to enable it to skip deleting files such as .htaccess and index.html.
- ``read_file()`` is now a deprecated alias of ``file_get_contents()``.
- :doc:`Security Helper <helpers/security_helper>` function ``strip_image_tags()`` is now an alias for the same method in the :doc:`Security Library <libraries/security>`.
+ - Deprecated :doc:`String Helper <helpers/string_helper>` function ``repeater()`` - it's just an alias for PHP's native ``str_repeat()``.
- Database
diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst
index 19500aa0d..530af2f89 100644
--- a/user_guide_src/source/helpers/string_helper.rst
+++ b/user_guide_src/source/helpers/string_helper.rst
@@ -96,6 +96,9 @@ Generates repeating copies of the data you submit. Example
The above would generate 30 newlines.
+.. note:: This function is DEPRECATED. Use the native ``str_repeat()``
+ instead.
+
reduce_double_slashes()
=======================
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index 952108356..dcdd6e351 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -134,6 +134,16 @@ CodeIgniter 3.1+.
.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner
rather than later.
+String helper repeater()
+========================
+
+:doc:`String Helper <../helpers/string_helper>` function ``repeater()`` is now just an alias for
+PHP's native ``str_repeat()`` function. It is deprecated and scheduled for removal in
+CodeIgniter 3.1+.
+
+.. note:: This function is still available, but you're strongly encouraged to remove it's usage sooner
+ rather than later.
+
Form helper form_prep()
=======================