Fixed several instances in WordPress where PHP Notices are not being handled correctly.

Fixes supplied by Aaron Jensen (aaron@visualprose.com).


git-svn-id: http://svn.automattic.com/wordpress/trunk@559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mikelittle
2003-11-30 00:55:19 +00:00
parent 3e120068f9
commit a5ab0fc858
6 changed files with 39 additions and 23 deletions

View File

@@ -919,6 +919,7 @@ function the_excerpt_rss($cut = 0, $encode_html = 0) {
$output = strip_tags($output);
}
if ($cut) {
$excerpt = '';
$blah = explode(' ', $output);
if (count($blah) > $cut) {
$k = $cut;
@@ -970,6 +971,7 @@ function get_the_excerpt($fakeit = false) {
$k = count($blah);
$use_dotdotdot = 0;
}
$excerpt = '';
for ($i=0; $i<$k; $i++) {
$excerpt .= $blah[$i].' ';
}
@@ -1227,6 +1229,9 @@ function get_category_link($echo = false, $file='') {
if ($file == '') {
$file = "$siteurl/$blogfilename";
}
if ('http:' != substr($file,0,5)) {
$file = "$siteurl/$file";
}
$link = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID;
if ($echo)
echo($link);