Purifier icon indicating copy to clipboard operation
Purifier copied to clipboard

Invalid argument supplied for foreach()

Open jyhsu2000 opened this issue 6 years ago • 0 comments

Environment

  • PHP: 7.3.3 / 7.3.8
  • Laravel: 5.8.33
  • mews/purifier: 2.1.4
  • ezyang/htmlpurifier: 4.10.0 (required by mews/purifier)
  • config: default

Issue

When I use the following code to clean text with custom_definition config,

Purifier::clean($richText, 'custom_definition');

it throws Invalid argument supplied for foreach() at vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php:691 screenshot_20190823_103104

Can you help for fix it? Or is there any workarounds to get over it?

jyhsu2000 avatar Aug 23 '19 03:08 jyhsu2000