Page 1 of 1
Not a bug - Cron Warning
Posted: 10 Apr 2019, 21:43
by Eddy
In the spirit of helping... I am getting this message from Cron every time system runs a backup.
PHP Warning: Use of undefined constant TEXT_ADMINISTRATOR - assumed 'TEXT_ADMINISTRATOR' (this will throw an Error in a future version of PHP) in /var/www/mydomain.com/includes/classes/users/users.php on line 96
Regards
Eddy
Re: Not a bug - Cron Warning
Posted: 11 Apr 2019, 13:40
by support
Replace attached file in /cron folder.
Let me know if it fixed.
Re: Not a bug - Cron Warning
Posted: 11 Apr 2019, 16:22
by Eddy
Replaced the file and it is the same... Cron will send the same warning bye-mail.
I found this link on internet
http://thisinterestsme.com/use-of-undefined-constant/.
Is TEXT_ADMINISTRATOR a variable?
Should the users.php code (referenced in the Warning message path. Line 96) have a $ sign like this:
Code: Select all
$cache[$users['id']] = array(
'name' => $name,
'email' => $users['field_9'],
'photo' => $photo,
'group_id' => (int)$users['field_6'],
'group_name'=> ($users['group_id']>0 ? $users['group_name'] : $TEXT_ADMINISTRATOR),
'profile' => $profile_fields
Instead of:
Code: Select all
$cache[$users['id']] = array(
'name' => $name,
'email' => $users['field_9'],
'photo' => $photo,
'group_id' => (int)$users['field_6'],
'group_name'=> ($users['group_id']>0 ? $users['group_name'] : TEXT_ADMINISTRATOR),
'profile' => $profile_fields