Fix a function too new for the PHP version of the server. Replace it with an older one.