Allow "0" as the content of <syntaxhighlight>

The empty() function considers "0" to be empty. Makes empty() useless
for strings.

(cherry picked from commit 8d8fb22ebb)

Bug: T41643
Change-Id: If0e647e3be269edcb23748d246bc564483aff0d2
This commit is contained in:
Derk-Jan Hartman 2014-11-29 20:02:08 +01:00 committed by Krinkle
parent 966ed89270
commit 49044ad215

View file

@ -595,10 +595,10 @@ class GeSHi {
* @since 1.0.0
*/
function GeSHi($source = '', $language = '', $path = '') {
if (!empty($source)) {
if ($source !== '') {
$this->set_source($source);
}
if (!empty($language)) {
if ($language !== '') {
$this->set_language($language);
}
$this->set_language_path($path);