From 2ecd3c8798a01ad2886514ac75cdb55a8c188b05 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 19 Oct 2016 15:07:04 +0200 Subject: fix phan warnings --- it_html.class | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/it_html.class b/it_html.class index 7d3fba9..1ca2acf 100644 --- a/it_html.class +++ b/it_html.class @@ -56,6 +56,8 @@ class it_html { static $voidtags = array('area' => 1, 'base' => 1, 'br' => 1, 'col' => 1, 'command' => 1, 'embed' => 1, 'hr' => 1, 'img' => 1, 'input' => 1, 'keygen' => 1, 'link' => 1, 'meta' => 1, 'param' => 1, 'source' => 1, 'track' => 1, 'wbr' => 1); # need no closing tag + var $p; # constructor params plus defaults + /** * Create a HTML object and global functions for all methods (exlcluding * methods starting with '_') in this class plus the default tags (see below). @@ -134,7 +136,7 @@ function it_html($p = array()) * @param $p Configuration settings. Can be set/overridden in constructor, configure(), html() or head(). * See constructor for a list of supported values */ -function configure($p) +static function configure($p) { $ithtml = $GLOBALS[$p['name'] ? $p['name'] : "it_html"]; $ithtml->p = $p + (array)$ithtml->p; @@ -436,7 +438,7 @@ function _strip_tags($html) * @param $html HTML string to be sanitized * @return Sanitized HTML */ -function sanitize($html) +static function sanitize($html) { $result = ""; $charset = $GLOBALS['it_html']->p['charset'] ? $GLOBALS['it_html']->p['charset'] : 'iso-8859-1'; @@ -491,7 +493,7 @@ function entity_decode($string) /** * Replace or remove all illegal characters from a HTML string (knows utf-8 and latin1) */ -function _cleanup($string, $charset) +static function _cleanup($string, $charset) { $result = $charset == "utf-8" ? preg_replace('/\xc2[\x80-\x9f]/', ' ', $string) @@ -505,7 +507,7 @@ function _cleanup($string, $charset) * @param $string String to encode with htmlspecialchars() * @return htmlspecialchars($string) */ -function Q($string) +static function Q($string) { $string = @strval($string); if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\xff]/', $string)) # WARNING: copy/pasted to _tag() -- cgit v1.2.3