summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/helpers/url_helper.php7
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 3 insertions, 5 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 2bd41b04d..58bde17b4 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -204,7 +204,7 @@ if ( ! function_exists('anchor_popup'))
if ( ! is_array($attributes))
{
- $attributes = array();
+ $attributes = array($attributes);
}
foreach (array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0', ) as $key => $val)
@@ -213,10 +213,7 @@ if ( ! function_exists('anchor_popup'))
unset($attributes[$key]);
}
- if ($attributes !== '')
- {
- $attributes = _parse_attributes($attributes);
- }
+ $attributes = empty($attributes) ? '' : _parse_attributes($attributes);
return '<a href="javascript:void(0);" onclick="window.open(\''.$site_url."', '_blank', '"._parse_attributes($atts, TRUE)."');\"".$attributes.'>'.$title.'</a>';
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 9ef0ce991..542c47396 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -279,6 +279,7 @@ Bug fixes for 3.0
- Fixed a bug (#318) - :doc:`Profiling <general/profiling>` setting *query_toggle_count* was not settable as described in the manual.
- Fixed a bug (#938) - :doc:`Config Library <libraries/config>` method site_url() added a question mark to the URL string when query strings are enabled even if it already existed.
- Fixed a bug (#999) - :doc:`Config Library <libraries/config>` method site_url() always appended ``$config['url_suffix']`` to the end of the URL string, regardless of wether a query string exists in it.
+- Fixed a bug where :doc:`URL Helper <helpers/url_helper>` function anchor_popup() ignored the attributes argument if it is not an array.
Version 2.1.1
=============