From: Robert Kaiser Date: Wed, 11 Mar 2020 23:59:54 +0000 (+0100) Subject: small fixes: HTML5 charset, deprecated curly brackets, argument names X-Git-Url: https://git-public.kairo.at/?a=commitdiff_plain;h=1a4ee0f0263c463f59bfb272435ef9f83fdffaa7;p=php-utility-classes.git small fixes: HTML5 charset, deprecated curly brackets, argument names --- diff --git a/classes/document.php-class b/classes/document.php-class index 1f82060..d3dca7d 100755 --- a/classes/document.php-class +++ b/classes/document.php-class @@ -259,7 +259,7 @@ class ExtendedDocument extends DOMDocument { static function initHTML5($doc = null) { if (is_null($doc)) { $doc = new ExtendedDocument(); } - $doc->loadHTML(''); // this seems to be the only way to get the DOCTYPE set properly. + $doc->loadHTML(''); // this seems to be the only way to get the DOCTYPE set properly. // Created basic HTML document structure. $root = $doc->getElementsByTagName('html')->item(0); @@ -374,8 +374,8 @@ class ExtendedDocument extends DOMDocument { public function appendJSElement($jsdata) { return $this->appendChild($this->createElementJS($jsdata)); } - public function appendJSFile($jsdata, $defer = false, $async = false) { - return $this->appendChild($this->createElementJSFile($jsdata, $defer, $async)); + public function appendJSFile($jsURL, $defer = false, $async = false) { + return $this->appendChild($this->createElementJSFile($jsURL, $defer, $async)); } public function appendHTMLMarkup($htmldata, $parentNode = null) { @@ -905,8 +905,8 @@ class ExtendedElement extends DOMElement { public function appendJSElement($jsdata) { return $this->appendChild($this->ownerDocument->createElementJS($jsdata)); } - public function appendJSFile($jsdata, $defer = false, $async = false) { - return $this->appendChild($this->ownerDocument->createElementJSFile($jsdata, $defer, $async)); + public function appendJSFile($jsURL, $defer = false, $async = false) { + return $this->appendChild($this->ownerDocument->createElementJSFile($jsURL, $defer, $async)); } public function setClass($classname) { $this->setAttribute('class', $classname); @@ -1173,8 +1173,8 @@ class ExtendedDocumentFragment extends DOMDocumentFragment { public function appendJSElement($jsdata) { return $this->appendChild($this->ownerDocument->createElementJS($jsdata)); } - public function appendJSFile($jsdata, $defer = false, $async = false) { - return $this->appendChild($this->ownerDocument->createElementJSFile($jsdata, $defer, $async)); + public function appendJSFile($jsURL, $defer = false, $async = false) { + return $this->appendChild($this->ownerDocument->createElementJSFile($jsURL, $defer, $async)); } } ?> diff --git a/classes/email.php-class b/classes/email.php-class index 4f35aa2..80a66cc 100644 --- a/classes/email.php-class +++ b/classes/email.php-class @@ -373,7 +373,7 @@ class email { // encode x09,x20 at lineends { $iLength = strlen($sLine); - $iLastChar = ord($sLine{$iLength-1}); + $iLastChar = ord($sLine[$iLength-1]); // !!!!!!!! // imap_8_bit does not encode x20 at the very end of a text, @@ -383,7 +383,7 @@ class email { if (!($bEmulate_imap_8bit && ($i==count($aLines)-1))) if (($iLastChar==0x09)||($iLastChar==0x20)) { - $sLine{$iLength-1}='='; + $sLine[$iLength-1]='='; $sLine .= ($iLastChar==0x09)?'09':'20'; } } // imap_8bit encodes x20 before chr(13), too diff --git a/classes/useragent.php-class b/classes/useragent.php-class index 407c48d..efda352 100755 --- a/classes/useragent.php-class +++ b/classes/useragent.php-class @@ -1003,7 +1003,7 @@ class userAgent { public function getAcceptLanguages() { if (!isset($this->uadata['accept-languages'])) { $headers = getAllHeaders(); - $accLcomp = explode(',', $headers['Accept-Language']); + $accLcomp = explode(',', @$headers['Accept-Language']); $accLang = array(); foreach ($accLcomp as $lcomp) { if (strlen($lcomp)) {