Add the below line
if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
From the docs.
The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead.
Also there is a plugin to fix this issue.
You can find the full list here.
Potential backward compatibility issues in Joomla 3 and Joomla Platform 12.2