FIX: PUT /thirdparties/{id} and PUT /contacts/{id} should throw exception if update returns < 0 + other issues #29596
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 #29594
Now I really think setting the
notrigger
param to 1 when callingContact::update
was just a copy/paste mistake (because it makes sense for the 3rd param ofSociete::update
to be 1 since this parameter iscall_trigger
and does the opposite ofnotrigger
).I also include in this PR a missing 500 throw when the endpoint fails to update the object (both Contact and Societe) + some minor PHPDoc inaccuracies.
@eldy I know you usually don't want to change REST API behaviour in released versions of Dolibarr even when the behaviour is arguably wrong, so if you feel that this change is significant enough, feel free to change the target branch to
develop
.