This question already has an answer here:
- PHP7 Constructor class name 2 answers
I am having Registry has a deprecated constructor
Error while running a php script.it shows the error on line 261. Going to that line I am having below codes.How to avoid this error.
class Registry {
function Registry() {
define("CWD", ($getcwd = getcwd() ? $getcwd : "."));
$config = array();
include INCLUDES . "config.php";
if (sizeof($config) == 0) {
if (file_exists(INCLUDES . "config.php")) {
exit( "<div style=\"border: 1px dashed #cc0000;font-family:Tahoma;background-color:#FBEEEB;width:100%;padding:10px;color:#cc0000;\"><strong>Welcome to EvolutionScript 5.1 FULL</strong><a></a><br>Before you can begin using EvolutionScript you need to perform the installation procedure. <a href=\"" . (file_exists( "install/install.php" ) ? "" : "../") . "install/install.php\" style=\"color:#000;\">Click here to begin ...</a><br></div>" );
}
else {
exit("<br /><br /><strong>Configuration</strong>: includes/config.php does not exist. Please fill out the data in config.php.new and rename it to config.php");
}
}
$this->config = $config;
define("TABLE_PREFIX", trim($this->config['Database']['tableprefix']));
define("COOKIE_PREFIX", (empty($this->config['Misc']['cookieprefix']) ? "ptc" : $this->config['Misc']['cookieprefix']) . "_");
}
}
</div>