LibreBooking / app

Repository for the last open source version of Booked Scheduler. The "develop" branch contains the most current working code of the project and should be considered beta. The "master" branch is the most current stable release of BookedScheduler. Please read doc/README.md for further details.
GNU General Public License v3.0
386 stars 232 forks source link

fix: Undefined array key 2 #362

Closed JohnVillalovos closed 4 months ago

JohnVillalovos commented 4 months ago

Was seeing the following errors in the log: PHP Warning: Undefined array key 2 in /var/www/html/Domain/ReservationItemView.php on line 490

The issue was caused by array_splice()

After using array_splice then $name_parts is now only a single element array, as all other elements have been removed and used to generate $firstnames

stiftovich commented 2 months ago

Shouldn't htis fix also applied to line 514 in Domain/ReservationItemView.php? array_splice() is used there as well.

JohnVillalovos commented 2 months ago

Probably. I haven't hit that code path yet.

Feel free to create a PR.