0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-09 15:28:40 +00:00

PHP 7.0 warnings fix: don't pass rvalue by reference.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
Edward Z. Yang 2016-10-27 01:53:38 -07:00
parent 3ba9133b21
commit 3ae21ce511
2 changed files with 6 additions and 3 deletions

View File

@ -10,7 +10,8 @@ class HTMLPurifier_AttrValidator_ErrorsTest extends HTMLPurifier_ErrorsHarness
$this->language = HTMLPurifier_LanguageFactory::instance()->create($config, $this->context); $this->language = HTMLPurifier_LanguageFactory::instance()->create($config, $this->context);
$this->context->register('Locale', $this->language); $this->context->register('Locale', $this->language);
$this->collector = new HTMLPurifier_ErrorCollector($this->context); $this->collector = new HTMLPurifier_ErrorCollector($this->context);
$this->context->register('Generator', new HTMLPurifier_Generator($config, $this->context)); $gen = new HTMLPurifier_Generator($config, $this->context);
$this->context->register('Generator', $gen);
} }
protected function invoke($input) protected function invoke($input)

View File

@ -30,7 +30,8 @@ class HTMLPurifier_DefinitionCacheFactoryTest extends HTMLPurifier_Harness
$this->factory->addDecorator('Memory'); $this->factory->addDecorator('Memory');
$cache = $this->factory->create('Test', $this->config); $cache = $this->factory->create('Test', $this->config);
$cache_real = new HTMLPurifier_DefinitionCache_Decorator_Memory(); $cache_real = new HTMLPurifier_DefinitionCache_Decorator_Memory();
$cache_real = $cache_real->decorate(new HTMLPurifier_DefinitionCache_Serializer('Test')); $ser = new HTMLPurifier_DefinitionCache_Serializer('Test');
$cache_real = $cache_real->decorate($ser);
$this->assertEqual($cache, $cache_real); $this->assertEqual($cache, $cache_real);
} }
@ -39,7 +40,8 @@ class HTMLPurifier_DefinitionCacheFactoryTest extends HTMLPurifier_Harness
$this->factory->addDecorator(new HTMLPurifier_DefinitionCache_Decorator_Memory()); $this->factory->addDecorator(new HTMLPurifier_DefinitionCache_Decorator_Memory());
$cache = $this->factory->create('Test', $this->config); $cache = $this->factory->create('Test', $this->config);
$cache_real = new HTMLPurifier_DefinitionCache_Decorator_Memory(); $cache_real = new HTMLPurifier_DefinitionCache_Decorator_Memory();
$cache_real = $cache_real->decorate(new HTMLPurifier_DefinitionCache_Serializer('Test')); $ser = new HTMLPurifier_DefinitionCache_Serializer('Test');
$cache_real = $cache_real->decorate($ser);
$this->assertEqual($cache, $cache_real); $this->assertEqual($cache, $cache_real);
} }