PHP Registry has a deprecated constructor Error : <p>I am having <code>Registry has a deprecated constructor</code>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.</p>

<pre><code>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( "&lt;div style=\"border: 1px dashed #cc0000;font-family:Tahoma;background-color:#FBEEEB;width:100%;padding:10px;color:#cc0000;\"&gt;&lt;strong&gt;Welcome to EvolutionScript 5.1 FULL&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;br&gt;Before you can begin using EvolutionScript you need to perform the installation procedure. &lt;a href=\"" . (file_exists( "install/install.php" ) ? "" : "../") . "install/install.php\" style=\"color:#000;\"&gt;Click here to begin ...&lt;/a&gt;&lt;br&gt;&lt;/div&gt;" );
        }
        else {
            exit("&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Configuration&lt;/strong&gt;: includes/config.php does not exist. Please fill out the data in config.php.new and rename it to config.php");
        }
    }

    $this-&gt;config = $config;

    define("TABLE_PREFIX", trim($this-&gt;config['Database']['tableprefix']));
    define("COOKIE_PREFIX", (empty($this-&gt;config['Misc']['cookieprefix']) ? "ptc" : $this-&gt;config['Misc']['cookieprefix']) . "_");
  }
}
</code></pre>
