Skip to content

Commit

Permalink
fix #24780 change default isolation method in dol_clone
Browse files Browse the repository at this point in the history
This fixes serialization error when attempting to update a custom field value.
This change is made globally because the previous native = 0 default isolation
method is labeled as `deprecated` in the code and therefore shouldn't be used
anymore.

Signed-off-by: Alexis Thietard <alexis.thietard@rtone.fr>
  • Loading branch information
Al-thi committed Apr 18, 2024
1 parent d6c4db0 commit dd50db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ function dol_get_object_properties($obj, $properties = [])
* @see https://php.net/manual/language.oop5.cloning.php
* @phan-suppress PhanTypeExpectedObjectPropAccess
*/
function dol_clone($object, $native = 0)
function dol_clone($object, $native = 2)
{
if ($native == 0) {
// deprecated method, use the method with native = 2 instead
Expand Down

0 comments on commit dd50db3

Please sign in to comment.