In view/objectDetail.php, you can find this odd signature with an optional paramater that is not placed at the end :
function drawStructureFromObject($obj, $refresh=false, $way, $item) {
This is depreciated in PHP8 and will cause an error with the following versions. After examining all the callers, I suggest to remove the optionnality:
function drawStructureFromObject($obj, $refresh, $way, $item) {
Same error, same fix for:
function drawSubscriptionsList($obj, $refresh=false, $limitToActive) {
function drawVersionStructureFromObjectAsset($obj, $refresh=false, $way, $item) {
function drawVersionStructureFromObject($obj, $refresh=false, $way, $item) {
Hi,
Yes, I started to test under PHP8, wich requires (weel it's only deprecated message yet) that optional parameter cannot be followed by required one.
We fixed with different, but systematic solution : after optional parameter, existing required parameters are set option with null value
function drawStructureFromObject($obj, $refresh=false, $way=null, $item=null) {
This will work in all cases as these parameters are always set (they were required).
function drawSubscriptionsList($obj, $refresh=false, $limitToActive) {
function drawVersionStructureFromObjectAsset($obj, $refresh=false, $way, $item) {
function drawVersionStructureFromObject($obj, $refresh=false, $way, $item) {
Yes, I already found these errors during first PHP8 testing, and few others in tcpdt_fonts.php, tcpdf_static.php, EmployeeManagerMain.php, RequestHandler.php, PlannningElementMain.php, ImputationLine.php and projeqtor.php