Make WordPress Core


Ignore:
Timestamp:
11/30/2003 12:55:19 AM (22 years ago)
Author:
mikelittle
Message:

Fixed several instances in WordPress where PHP Notices are not being handled correctly.
Fixes supplied by Aaron Jensen (aaron@…).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2functions.php

    r558 r559  
    294294    global $smilies_directory, $use_smilies;
    295295    global $b2_smiliessearch, $b2_smiliesreplace;
    296 
     296    $output = '';
    297297    if ($use_smilies) {
    298298        // HTML loop taken from texturize function, could possible be consolidated
     
    301301        for ($i = 0; $i < $stop; $i++) {
    302302            $content = $textarr[$i];
    303             if ('<' != $content{0}) { // If it's not a tag
     303            if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
    304304                $content = str_replace($b2_smiliessearch, $b2_smiliesreplace, $content);
    305305            }
     
    16291629    if (isset($b2_filter['all'])) {
    16301630        $b2_filter['all'] = (is_string($b2_filter['all'])) ? array($b2_filter['all']) : $b2_filter['all'];
    1631         $b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]);
     1631        if (isset($b2_filter[$tag]))
     1632            $b2_filter[$tag] = array_merge($b2_filter['all'], $b2_filter[$tag]);
     1633        else
     1634            $b2_filter[$tag] = array_merge($b2_filter['all'], array());
    16321635        $b2_filter[$tag] = array_unique($b2_filter[$tag]);
    16331636    }
Note: See TracChangeset for help on using the changeset viewer.