I have the following class that generates a Notice: Uninitialized string offset: 0 each time it is called. The lines generating the notice are marked. How do I fix this?

class InputFilter {
        var $tagsArray;
        var $attrArray;
        var $tagsMethod;
        var $attrMethod;
        var $xssAuto;
var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml'); var $attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc'); function inputFilter($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) { for ($i = 0; $i < count($tagsArray); $i++) $tagsArray[$i] = strtolower($tagsArray[$i]); //<< Notice Generated Here for ($i = 0; $i < count($attrArray); $i++) $attrArray[$i] = strtolower($attrArray[$i]); //<< Notice Generated Here also
                $this->tagsArray = (array) $tagsArray;
                $this->attrArray = (array) $attrArray;
                $this->tagsMethod = $tagsMethod;
                $this->attrMethod = $attrMethod;
                $this->xssAuto = $xssAuto;
        }
}

TIA.

Al Padley

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to