Don't use error suppression on realpath() + style adjustments
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 5f11a42..dff1a86 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -148,14 +148,9 @@
{
$title = (string) $title;
- if ( ! is_array($uri))
- {
- $site_url = preg_match('#^(\w+:)?//#i', $uri) ? $uri : site_url($uri);
- }
- else
- {
- $site_url = site_url($uri);
- }
+ $site_url = is_array($uri)
+ ? site_url($uri)
+ : preg_match('#^(\w+:)?//#i', $uri) ? $uri : site_url($uri);
if ($title === '')
{
@@ -481,11 +476,11 @@
$q_separator = preg_quote($separator, '#');
$trans = array(
- '&.+?;' => '',
- '[^a-z0-9 _-]' => '',
- '\s+' => $separator,
- '('.$q_separator.')+' => $separator
- );
+ '&.+?;' => '',
+ '[^a-z0-9 _-]' => '',
+ '\s+' => $separator,
+ '('.$q_separator.')+' => $separator
+ );
$str = strip_tags($str);
foreach ($trans as $key => $val)