diff --git a/ChangeLog b/ChangeLog index 60efdf1093b..6580a4e5dda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -104,7 +104,7 @@ FIX: #yogosha21416 For users: ---------- -NEW: Compatibility with PHP 8.2 +NEW: Compatibility with PHP 8.2 (warning must be disabled) NEW: Module Workstation (used to enhance the module BOM and Manufacturing Order) is now stable NEW: Add a CLI tool to regenerate all documents NEW: Add a confirmation popup when deleting extrafields diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index cba500c0a0e..250a7da0855 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -1284,9 +1284,9 @@ class DoliDBPgsql extends DoliDB if (isset($field_desc['default']) && $field_desc['default'] != '') { if ($field_desc['type'] == 'double' || $field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') { - $sql .= " DEFAULT ".$this->escape($field_desc['default']); - } elseif ($field_desc['type'] != 'text') { - $sql .= " DEFAULT '".$this->escape($field_desc['default'])."'"; // Default not supported on text fields + $sql .= ", ALTER COLUMN ".$this->escape($field_name)." SET DEFAULT ".((float) $field_desc['default']); + } elseif ($field_desc['type'] != 'text') { // Default not supported on text fields ? + $sql .= ", ALTER COLUMN ".$this->escape($field_name)." SET DEFAULT '".$this->escape($field_desc['default'])."'"; } } diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 0ecefaed4ce..686475d1211 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -243,7 +243,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $object->fetch_thirdparty(); - $dir = $conf->facture->dir_output; + $dir = empty($conf->facture->multidir_output[$object->entity]) ? $conf->facture->dir_output : $conf->facture->multidir_output[$object->entity]; $objectref = dol_sanitizeFileName($object->ref); if (!preg_match('/specimen/i', $objectref)) { $dir .= "/".$objectref; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index feec219703d..ad4b0d1bdd8 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -2152,7 +2152,7 @@ if ($action != 'dopayment') { if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') != 'integral') { print '
 
'; } - print ' '; + print ' '; if (getDolGlobalString('PAYPAL_API_INTEGRAL_OR_PAYPALONLY') == 'integral') { print '
'; print ''.$langs->trans("CreditOrDebitCard").' - '; diff --git a/test/phpunit/DoliDBTest.php b/test/phpunit/DoliDBTest.php index 7abc7557a91..c2a0de05a20 100644 --- a/test/phpunit/DoliDBTest.php +++ b/test/phpunit/DoliDBTest.php @@ -81,7 +81,7 @@ class DoliDBTest extends CommonClassTest print __METHOD__." result=".$result."\n"; // TODO Use $savtype and $savnull instead of hard coded - $field_desc = array('type' => 'varchar', 'value' => '16', 'null' => 'NOT NULL'); + $field_desc = array('type'=>'varchar', 'value'=>'16', 'null'=>'NOT NULL', 'default'=>'aaaabbbbccccdddd'); $result = $db->DDLUpdateField($db->prefix().'c_paper_format', 'code', $field_desc); $this->assertEquals(1, $result);