注意:未初始化的字符串偏移量:C中4414:

I am building a program that will allow users to upload the files they have written in text editors or something like Microsoft office rather that just copying and pasting them.The files they are to upload are mostly of the .rtf form. This program is made using php, I am not a very advanced php programmer, so i grabbed a rtf to HTML file convertor form a lover of open source php programmer, it works fine and the file is converted and displayed but it is accompanied with this notice together with a warning that says "Warning: array_push() expects parameter 1 to be array, null given in C:", i know i might be using an array tag with a variable that is not an array, but i tried to check it and it is an array, so can anybody help me with this.

the code for that is very long here it is:

class RtfElement
{
    protected function Indent($level)
    {
        for($i = 0; $i < $level * 2; $i++) echo "&nbsp;";
    }
}

class RtfGroup extends RtfElement
{
    public $parent;
    public $children;
    public function __construct()
    {
        $this->parent = null;
        $this->children = array();
    }

    public function GetType()
    {
        // No children?
        if(sizeof($this->children) == 0) return null;
        // First child not a control word?
        $child = $this->children[0];
        if(get_class($child) != "RtfControlWord") return null;
        return $child->word;
    }    

    public function IsDestination()
    {
        // No children?
        if(sizeof($this->children) == 0) return null;
        // First child not a control symbol?
        $child = $this->children[0];
        if(get_class($child) != "RtfControlSymbol") return null;
        return $child->symbol == '*';
    }

    public function dump($level = 0)
    {
        echo "<div>";
        $this->Indent($level);
        echo "{";
        echo "</div>";

        foreach($this->children as $child)
        {
            if(get_class($child) == "RtfGroup")
            {
                if ($child->GetType() == "fonttbl") continue;
                if ($child->GetType() == "colortbl") continue;
                if ($child->GetType() == "stylesheet") continue;
                if ($child->GetType() == "info") continue;
                // Skip any pictures:
                if (substr($child->GetType(), 0, 4) == "pict") continue;
                if ($child->IsDestination()) continue;
            }
            $child->dump($level + 2);
        }

        echo "<div>";
        $this->Indent($level);
        echo "}";
        echo "</div>";
    }
}

class RtfControlWord extends RtfElement
{
    public $word;
    public $parameter;

    public function dump($level)
    { 
        echo "<div style='color:green'>";
        $this->Indent($level);
        echo "WORD {$this->word} ({$this->parameter})";
        echo "</div>";
    }
}

class RtfControlSymbol extends RtfElement
{
    public $symbol;
    public $parameter = 0;

    public function dump($level)
    {
        echo "<div style='color:blue'>";
        $this->Indent($level);
        echo "SYMBOL {$this->symbol} ({$this->parameter})";
        echo "</div>";
    }    
}

class RtfText extends RtfElement
{
    public $text;

    public function dump($level)
    {
        echo "<div style='color:red'>";
        $this->Indent($level);
        echo "TEXT {$this->text}";
        echo "</div>";
    }    
}

class RtfReader
{
    public $root = null;

    protected function GetChar()
    {
        $this->char = $this->rtf[$this->pos++];
    }

    protected function ParseStartGroup()
    {
        // Store state of document on stack.
        $group = new RtfGroup();
        if($this->group != null) $group->parent = $this->group;
        if($this->root == null)
        {
            $this->group = $group;
            $this->root = $group;
        }
        else
        {
            array_push($this->group->children, $group);
            $this->group = $group;
        }
    }

    //and the line 140 is inside this function:
    protected function GetChar()
    {
        $this->char = $this->rtf[$this->pos++];
    }
}

I did not write all the code here, because it's too long but that is from the first line 2 to line 140.