Skip to content

Commit

Permalink
FIX line_date_xxx into ODF was not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 6, 2025
1 parent 634cbf4 commit 7f78e00
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions htdocs/core/class/commondocgenerator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,9 @@ public function get_substitutionarray_lines($line, $outputlangs, $linenumber = 0
array('line_date_end_rfc', 'date_end', 'dayrfc', 'auto', null)
);
foreach ($date_specs as $date_spec) {
if (property_exists($line, $date_spec[1])) {
$resarray[$date_spec[0]] = dol_print_date($line->${$date_spec[1]}, $date_spec[2], $date_spec[3], $date_spec[4]);
$propertyname = $date_spec[1];
if (property_exists($line, $propertyname)) {
$resarray[$date_spec[0]] = dol_print_date($line->$propertyname, $date_spec[2], $date_spec[3], $date_spec[4]);

Check warning on line 938 in htdocs/core/class/commondocgenerator.class.php

View workflow job for this annotation

GitHub Actions / phan / Run phan

commondocgenerator.class.php: PhanUndeclaredProperty: Reference to undeclared property \CommonObjectLine->date_start
}
}

Expand Down Expand Up @@ -1126,9 +1127,9 @@ public function get_substitutionarray_shipment($object, $outputlangs, $array_key
* Define array with couple substitution key => substitution value
*
* @param array<string,CommonObject|float|int|string> $object Dolibarr Object
* @param Translate $outputlangs Language object for output
* @param boolean|int $recursive Want to fetch child array or child object.
* @return array<string,mixed> Array of substitution key->code
* @param Translate $outputlangs Language object for output
* @param boolean|int $recursive Want to fetch child array or child object.
* @return array<string,mixed> Array of substitution key->code
*/
public function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = 1)
{
Expand Down

0 comments on commit 7f78e00

Please sign in to comment.