*

mwindey

  • *****
  • 506 posts
Test v8.3 error in admin Deprecated: trim(): Passing null
« on: March 19, 2025, 04:12:25 PM »
In new version viewing admin/users shows deprecated with php 8.2
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/u44173p136925/domains/****/public_html/oc-includes/osclass/classes/datatables/UsersDataTable.php on line 136

This line:
Code: [Select]
$row['phone'] = trim(trim($aRow['s_phone_mobile']) <> '' ? $aRow['s_phone_mobile'] : $aRow['s_phone_land']);

To this:
Code: [Select]
$row['phone'] = trim(!empty($aRow['s_phone_mobile']) ? $aRow['s_phone_mobile'] : (!empty($aRow['s_phone_land']) ? $aRow['s_phone_land'] : ''));

fixed the error

*

MB Themes

Re: Test v8.3 error in admin Deprecated: trim(): Passing null
« Reply #1 on: March 26, 2025, 02:12:59 PM »
Thanks for feedback ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots