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

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


git-svn-id: https://develop.svn.wordpress.org/trunk@559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Little
2003-11-30 00:55:19 +00:00
parent 4efb6bb23a
commit bee8734f21
6 changed files with 39 additions and 23 deletions
+6 -3
View File
@@ -293,14 +293,14 @@ function convert_gmcode($content) {
function convert_smilies($text) {
global $smilies_directory, $use_smilies;
global $b2_smiliessearch, $b2_smiliesreplace;
$output = '';
if ($use_smilies) {
// HTML loop taken from texturize function, could possible be consolidated
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
$stop = count($textarr);// loop stuff
for ($i = 0; $i < $stop; $i++) {
$content = $textarr[$i];
if ('<' != $content{0}) { // If it's not a tag
if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
$content = str_replace($b2_smiliessearch, $b2_smiliesreplace, $content);
}
$output .= $content;
@@ -1628,7 +1628,10 @@ function apply_filters($tag, $string) {
global $b2_filter;
if (isset($b2_filter['all'])) {
$b2_filter['all'] = (is_string($b2_filter['all'])) ? array($b2_filter['all']) : $b2_filter['all'];
$b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]);
if (isset($b2_filter[$tag]))
$b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]);
else
$b2_filter[$tag] = array_merge($b2_filter['all'], array());
$b2_filter[$tag] = array_unique($b2_filter[$tag]);
}
if (isset($b2_filter[$tag])) {