pluginsGLPI / order

Order plugin for GLPI
GNU General Public License v3.0
39 stars 44 forks source link

Bug with printing purchase orders of sub-entities #386

Closed IP-V15 closed 1 month ago

IP-V15 commented 1 month ago

Hello When I want to generate a purchase order in ODT on a sub-entity, I systematically have a crash. I do not have the problem that the purchase order is assigned to the main entity. Does anyone have the same problem?

The Error Message: Deprecated: Return type of Odtphp\Segment::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\Segment.php on line 87

Deprecated: Return type of Odtphp\Segment::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\Segment.php on line 77

Deprecated: Return type of Odtphp\SegmentIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 31

Deprecated: Return type of Odtphp\SegmentIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 41

Deprecated: Return type of Odtphp\SegmentIterator::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 36

Deprecated: Return type of Odtphp\SegmentIterator::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 61

Deprecated: Return type of Odtphp\SegmentIterator::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 46

Deprecated: Return type of Odtphp\SegmentIterator::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 51

Deprecated: Return type of Odtphp\SegmentIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 56

Deprecated: Creation of dynamic property Odtphp\SegmentIterator::$keys is deprecated in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 28

Deprecated: Creation of dynamic property Odtphp\SegmentIterator::$keys is deprecated in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\SegmentIterator.php on line 28

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\Odf.php on line 377

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\Odf.php on line 377

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\Odf.php on line 377

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in C:\xampp\htdocs\glpi\marketplace\order\vendor\masnathan\odtphp\src\Odf.php on line 377

trasher commented 1 month ago

The ODT lib is not compliant with your PHP version (not specified). This library has not been update from years, it should certainly be considered as dead. The only workaround would be to downgrade your PHP version, if you really need this feature right now.

I'm not the maintainer of the plugin, I have no idea how/when this will be fixed - and either if it will be.

IP-V15 commented 1 month ago

Ok. Thanks. There is a another similar issue about this problem with a another "bad" solution : [https://github.com/pluginsGLPI/order/issues/385]

trasher commented 1 month ago

OK, so this is a duplicate of #385