Author Topic: Getting Error Deprecated  (Read 60 times)

Offline mannyb

  • Sr. Member
  • ****
  • Posts: 14
  • Karma: +0/-0
Getting Error Deprecated
« on: March 01, 2020, 04:31:29 PM »
Just started getting this error on website. Any Help would be appreciated.

Deprecated: Function create_function() is deprecated in /home/myname/public_html/libs/plugins/modifier.sortby.php on line 33

mannyb

Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 514
  • Karma: +9/-2
Re: Getting Error Deprecated
« Reply #1 on: March 02, 2020, 03:46:37 AM »
Try to replace in \libs\plugins\modifier.sortby.php

this code:

Code: [Select]
$sort_func = $sort_funcs[$sortby] = create_function('$a, $b', $code);


with this code:

Code: [Select]
$sort_func = $sort_funcs[$sortby] = @create_function('$a, $b', $code);

Offline mannyb

  • Sr. Member
  • ****
  • Posts: 14
  • Karma: +0/-0
Re: Getting Error Deprecated
« Reply #2 on: March 03, 2020, 08:56:54 AM »
Now I am getting this in the admin:

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/mysite/public_html/classes/adodb/adodb.inc.php on line 1167

and this on signup page on site.

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/ajunky52/public_html/libs/sysplugins/smarty_internal_compilebase.php on line 75

Offline alexa

  • Administrator
  • Hero Member
  • *****
  • Posts: 514
  • Karma: +9/-2
Re: Getting Error Deprecated
« Reply #3 on: March 03, 2020, 04:55:37 PM »
1. Please upload adodb in classes folder [attachment]

2. In settings.php replace this code:

Code: [Select]
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
with this code:

Code: [Select]
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED);
« Last Edit: March 03, 2020, 04:58:41 PM by alexa »