FIX: modification of complementary attributes in commercial proposals #26115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FIX: modification of complementary attributes in commercial proposals
Problem
We have some complementary attributes in
/comm/admin/propal_extrafields.php
in our Dolibarr 16.0.5 instance. When trying to modify these attributes on any commercial proposal, we get a blank page. For example:Here, we click on the pen icon next to
% Facturé
, we select a value, then we click onMODIFY
. We get a blank page, and the following error in the logs:Fix
This PR replaces the dol_clone function by the one in the 17.0 branch, in order to have the method 2 (Full isolation method keeping only scalar and array properties). There should be no side effects, but if you want to be extra sure, I can keep the old conditions (ie.
if (empty($native))
instead ofif ($native == 0)
andif ($tmpsavdb)
instead ofif (!empty($tmpsavdb))
).Then, I use the method 2 in the
dol_clone
that caused the PHP error incomm/propal/card.php
.I tested this fix in our instance and everything seems fine.