Fixes #4238: Fixed intolerance to nulls in CJavaScript::quote()

This commit is contained in:
stevoh6
2019-01-29 18:40:51 +01:00
committed by Alexander Makarov
parent 46bf33ace0
commit 4874064325
3 changed files with 17 additions and 6 deletions

View File

@@ -42,4 +42,12 @@ class CJavaScriptTest extends CTestCase
$output=CJavaScript::quote($input,true);
$this->assertEquals('test%20%E2%80%A8%0Atest%20%E2%80%A9',$output);
}
public function testQuoteWithNull()
{
$input=null;
$output=CJavaScript::quote($input);
$this->assertSame('',$output);
}
}