Deprecation Notice (php 8.1 passing null through ucfirst)

Hello,

I upgraded to v1.6 last week and got it on production. Worked fine for me on Chrome and Edge; pdf generator better on Edge than chrome. However, today my client alerted me to an error on the client view. He uses Firefox.

NOTE: my modules are custom v1.5; aside from modules and pdf views, I upgraded the rest of IP to to 1.6. This may not be an issue in 1.6 proper.

on modules->clients->views->view.php line 103 was the issue. I did some looking and saw others had similar problems in their software.

I suspect IP is designed to default any nulls in this context to ‘System’. So, I updated line 103 with:

<?php if($client->client_language !== null){$cust = ucfirst($client->client_language);}
		else{$cust = 'System';}
		echo $cust;
?>

Sharing incase other need this tip; feel free to share a better tip if this is less than optimal.

1 Like