Search code examples
phpmysqlxampppear

Pear Error Deprecated


Well I have been writing in the same style for awhile now and all of the sudden i am getting an error in pear config.

Error:

Deprecated: Assigning the return value of new by reference is deprecated in E:\xampp\php\PEAR\Config.php on line 80

Deprecated: Assigning the return value of new by reference is deprecated in E:\xampp\php\PEAR\Config.php on line 166

My Index Page (was the only thing i changed):

<?php

include("library/config.php"); 
include("library/functions/core.php");

// Defualt Heading
$heading = "";

// Load Page Model
loadModel($path0,$path1);

// Load User Language
loadLanguage($path0,$path1);

// Load Page Header
loadHeader();

// Load Page Body
loadPage($path0,$path1);

// Load Page Footer
loadFooter();
?>

The only thing i changed was the location of config.php and core.php, which got placed 1 folder deeper under a new folder named library.


Solution

  • as you are getting the error in config .php and showing us index.php code

    by reading error. there are some function which have in below format

    function whatever (...)
    {
       return &$somevalue;
    }
    

    to fix the problem , you should remove & before $somevalue

    read this