Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: e_parse addon toWYSIWYG() is not working for empty field #5408

Open
Jimmi08 opened this issue Jan 23, 2025 · 0 comments
Open

[Bug]: e_parse addon toWYSIWYG() is not working for empty field #5408

Jimmi08 opened this issue Jan 23, 2025 · 0 comments
Labels
type: bug A problem that should not be happening

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jan 23, 2025

What e107 version are you using?

Latest Github version (just updated)

Bug description

If bbarea field is empty, to WYSIWYG() in the plugin addon is never applied

The reason is this test:

					if($tmp = e107::callMethod($hookObj, 'toWYSIWYG', $value, $opts))
					{
						$value = $tmp;
						 
					}

$tmp is an empty string so it fails and the $value is not replaced

How to reproduce

Database value: [html][/html]

$text = $tp->toHTML($text, true); returns empty string ''

test fails

$value is still [html][/html]

Expected behavior

$value = '';

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

8.2

@Jimmi08 Jimmi08 added the type: bug A problem that should not be happening label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

1 participant