Skip to content

Commit

Permalink
Update functions.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danpros committed Jul 26, 2015
1 parent da14246 commit 9f8c462
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -946,12 +946,12 @@ function get_description($string, $char = null)
}
if (strlen(strip_tags($string)) < $char) {
$string = remove_accent($string);
$string = preg_replace('/[^A-Za-z0-9 !@#$%^&*(),.-]/u', '', strip_tags($string));
$string = preg_replace('/[^A-Za-z0-9 !@#$%^&*(),.-]/u', ' ', strip_tags($string));
$string = ltrim(rtrim($string));
return $string;
} else {
$string = remove_accent($string);
$string = preg_replace('/[^A-Za-z0-9 !@#$%^&*(),.-]/u', '', strip_tags($string));
$string = preg_replace('/[^A-Za-z0-9 !@#$%^&*(),.-]/u', ' ', strip_tags($string));
$string = ltrim(rtrim($string));
$string = substr($string, 0, $char);
$string = substr($string, 0, strrpos($string, ' '));
Expand Down Expand Up @@ -2056,4 +2056,4 @@ function shorten($string = null, $char = null)
return $string;
}

}
}

2 comments on commit 9f8c462

@gesundelehre
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I download and tested the latest release/commit - and made all files up-to-date.

Now I got an error when adding a static page:

Warning: array_filter() expects parameter 1 to be array, boolean given in /home/u151238773/public_html/new_htmly_testing/system/includes/functions.php on line 74


This error appears both on the main page, as well as on site_url/admin/

@gesundelehre
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow now it works...

Please sign in to comment.