PHP 5 and var
Brought to you by:
letreo
Name: mike
Email: mike@michaelpwilson.com
I am using PHP 5. I am unable to use an earlier version. If I change variables from var to public, I get a white screen.
Unkown Error
Sorry, an error occurred at /my_path/chat/include/adodb/drivers/adodb-mysql.inc.php
[2048] var: Deprecated. Please use the public/private/protected modifiers
Logged In: YES
user_id=1582574
Change
function session_error($errno, $errmsg, $filename,
$linenum, $vars)
{
POC_Chat::display_error($errno, $errmsg, $filename,
$linenum, $vars, POC_SESSION_ERROR);
}
function db_error($errno, $errmsg, $filename, $linenum,
$vars)
{
POC_Chat::display_error($errno, $errmsg, $filename,
$linenum, $vars, POC_DB_ERROR);
}
------------------------------------------------------------
------------------------------------------
With
------------------------------------------------------------
---------------------------------------
error_reporting(E_USER_ERROR | E_USER_WARNING |
E_USER_NOTICE);
function session_error($errno, $errmsg, $filename,
$linenum, $vars)
{
$user_errors = array(E_USER_ERROR, E_USER_WARNING,
E_USER_NOTICE);
if (in_array($errno, $user_errors)):
POC_Chat::display_error($errno, $errmsg, $filename,
$linenum, $vars, POC_SESSION_ERROR);
endif;
}
function db_error($errno, $errmsg, $filename, $linenum,
$vars)
{
$user_errors = array(E_USER_ERROR, E_USER_WARNING,
E_USER_NOTICE);
if (in_array($errno, $user_errors)):
POC_Chat::display_error($errno, $errmsg, $filename,
$linenum, $vars, POC_DB_ERROR);
endif;
}
In your index.php file