2
0
forked from Wavyzz/dolibarr

fix #24780 change default isolation method in dol_clone (#29391)

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>
This commit is contained in:
Alexis Thietard
2024-11-13 23:42:07 +01:00
committed by GitHub
parent e6e3112ee2
commit 8c9a1c2bfc

View File

@@ -1555,7 +1555,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