Cannot redeclare url_shorten()
-
I’ve just moved my blog up a level, from https://www.stpetersoundle.org.uk/new to https://www.stpetersoundle.org.uk. Everything seems fine, until I try and go to the admin pages. I can get to the login screen, but after I log in I get a blank page with the error:-
Fatal error: Cannot redeclare url_shorten() (previously declared in /home/t/tebesurmy/public_html/wp-admin/admin-functions.php:3) in /home/t/tebesurmy/public_html/wp-admin/admin-functions.php on line 1087
url_shorten on line 1087 looks like this:-
function url_shorten ($url) {
$short_url = str_replace(‘https://’, ”, stripslashes($url));
$short_url = str_replace(‘www.’, ”, $short_url);
if (‘/’ == substr($short_url, -1))
$short_url = substr($short_url, 0, -1);
if (strlen($short_url) > 35)
$short_url = substr($short_url, 0, 32).’…’;
return $short_url;
}I really don’t know what has gone wrong. Any ideas?
Thanks, Joannie
- The topic ‘Cannot redeclare url_shorten()’ is closed to new replies.