Search code examples
modxphp-parse-error

MODx Parse Error -Function split() is deprecated


I'm currently having an issue with MODx, when trying to access my website. It gives the following error:

 « MODx Parse Error »
   MODx encountered the following error while attempting to parse the requested resource:
  « PHP Parse Error »
 PHP error debug
  Error:    Function split() is deprecated   
  Error type/ Nr.:  - 8192   
  File:     /mnt/stor2-wc1-dfw1/371478/401863/www.stonero.com/web/content/manager    /includes/document.parser.class.inc.php     
  Line:     844  
  Line 844 source:  $tempSnippetParams= split($splitter, $tempSnippetParams);    

Parser timing
MySQL:  0.0283 s    (3 Requests)
PHP:    0.0430 s     
Total:  0.0713 s

It started as a problem on a subpage, and when I cleared the cache it just broke the entire site. Can someone help me out?

Thanks in advance, Chris


Solution

  • The PHP version on your web server does not support the split() function. It's likely you've installed a snippet or plugin coded for an outdated PHP version - or your web host has upgraded to a newer PHP version.

    You'll need to find this snippet/plugin and replace it with explode(). Easiest way would be to search the relevant tables in the database for the line:

    $tempSnippetParams= split($splitter, $tempSnippetParams);