We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    Hi,

    I am trying to recover an old 0.9.5 Db dump. Downloaded 0.9.5 and tried to install and off course get error about deprecated functions (split and ereg) running the sqlParser.class.php file on line 70 and 80 resp. Anyone has a quick alternative to fix these errors? I tried preg_split and preg_match but end with errors anyway. Thanks.
      • 36404
      • 307 Posts
      hi,

      normally, preg_split (or simply explode) and preg_match should do the jod, the only problem could be the syntax, e.g.
      ereg('toto', $string); //you don't need delimiters for simple string search

      must be changed into
      preg_match('#toto#', $string); //here you need delimiters even for a simple string search

      in the split case, you can simply change
      split(',', $string);

      into
      explode(',', $string);

      when you don't need a regex, they will do the same job smiley

      have swing
        réfléchir avant d'agir
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Upgrading the site to 1.0.6, which should correct any depreciated code. It should be faster than manually fixing the code, there is also the option of checking github for how they fixed it and manually backport the fix.
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting