soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 29 forks source link

Dynamic Data "PHP Function Return Value" with no parameters given overrides first parameter default value with empty string #3404

Closed ThinkByDesign closed 10 months ago

ThinkByDesign commented 1 year ago

Describe the bug

A clear and concise description of what the bug is. I created a simple PHP function: function paramTester($parameter="default") { return 'Parameter value: ('.$parameter.')'; }

When called using Insert Dynamic Data's PHP Function Return value feature, even if I supply NO parameter values, it calls the function with an empty string as the first parameter (which prevents the default value from being applied).

A link to a Sandbox site where the bug has been reproduced https://oxygenbuilder.com/try? (REQUIRED) https://oxygen-qq7dphz4lpfvl.oxygen-demo.qsandbox.org/home/

Look at the homepage just below the "start now" and "learn more" buttons. The function can be found in a code block just before the text module showing the function results.

Kpudlo commented 10 months ago

Duplicate of https://github.com/soflyy/oxygen-bugs-and-features/issues/2759 and reported internally via https://github.com/soflyy/oxygen/issues/4305