Explorar o código

[FormatAbstract] Allow child classes to overwrite DEFAULT_CHARSET

By using 'static' instead of 'self' the constant may
be overridden by child classes.
logmanoriginal %!s(int64=7) %!d(string=hai) anos
pai
achega
4f4fb11789
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/FormatAbstract.php

+ 1 - 1
lib/FormatAbstract.php

@@ -18,7 +18,7 @@ abstract class FormatAbstract implements FormatInterface {
 	public function getCharset(){
 		$charset = $this->charset;
 
-		return is_null($charset) ? self::DEFAULT_CHARSET : $charset;
+		return is_null($charset) ? static::DEFAULT_CHARSET : $charset;
 	}
 
 	protected function setContentType($contentType){