Jump to content

Edit History

Miestre

Miestre

Hello all,

 

Im having a problem adding extra fees, when i make apply, gives this error.

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 355

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 355

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 355

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /home/excitasy/public_html/classes/Validate.php:355) in /home/excitasy/public_html/classes/Tools.php on line 223

 

ON validate. PHP i have this:
 

/**
     * Check for HTML field validity (no XSS please !)
     * @param string $html HTML field to validate
     * @return bool Validity is ok or not
     */
    public static function isCleanHtml($html, $allow_iframe = false)
    {
        $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange';
        $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend';
        $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove';
        $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel';
        $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart';
        $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange';
        $events .= '|onselectstart|onstart|onstop';

       LINE 355 if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) {
            return false;
        }

        if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) {
            return false;
        }

i have other site with the same theme and i dont have this error..

Help me please.

Thanks

Miestre

Miestre

Hello all,

 

Im having a problem adding extra fees, when i make apply, gives this error.

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 355

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 355

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 355

Warning: preg_match() expects parameter 2 to be string, array given in /home/excitasy/public_html/classes/Validate.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /home/excitasy/public_html/classes/Validate.php:355) in /home/excitasy/public_html/classes/Tools.php on line 223

 

ON validate. PHP i have this:
 

/**
     * Check for HTML field validity (no XSS please !)
     * @param string $html HTML field to validate
     * @return bool Validity is ok or not
     */
    public static function isCleanHtml($html, $allow_iframe = false)
    {
        $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange';
        $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend';
        $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove';
        $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel';
        $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart';
        $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange';
        $events .= '|onselectstart|onstart|onstop';

        if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) {
            return false;
        }

        if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) {
            return false;
        }

i have other site with the same theme and i dont have this error..

Help me please.

Thanks

×
×
  • Create New...