Okay, jeg poster lige inc.functions.php
<?php
# Include function libraries (classes)
require "lib/lib.tagster.php";
require "lib/lib.profile.php";
require "lib/lib.question.php";
require "lib/lib.cache.php";
require "lib/lib.error.php";
require "lib/lib.design.php";
require "lib/lib.categories.php";
require "lib/lib.sizes.php";
require "lib/lib.user.php";
require "lib/lib.datetime.php";
require "lib/lib.info.php";
require "lib/lib.general.php";
require "lib/lib.email.php";
require "lib/lib.menu.php";
require "lib/lib.settings.php";
require "lib/class.imageresize.php";
require "lib/class.coolstuff.php";
require "inc.config.php";
session_start();
# Return values
define("R_ERROR", 0);
define("R_NOERROR", 1);
define("R_DATA_UPDATED", 2);
define("R_USERNAME_CHANGED", 4);
define("R_PASSWORD_CHANGED", 8);
define("R_ICQ_SET", 16);
define("R_EMAIL_PUBLIC", 32);
define("R_EMAIL_CHANGED", 64);
define("R_PICTURE_UPDATED", 128);
define("R_PICTURE_DELETED", 256);
define("R_USER_NACTIVE", 512);
define("R_USER_DELETED", 1024);
# Text alignment
define("A_LEFT", 1);
define("A_RIGHT", 2);
# Error Handler
function error_handler($errno, $errstr, $errfile, $errline)
{
global $_SYS;
# do not report errors from these functions
$func_exceptions = array("mail()");
if ($errno == E_WARNING)
{
if (preg_match("'([a-z_-]+\\(\\))( \\[.*\\]:|:) (.*)'i", strip_tags($errstr), $regs))
{
if (!in_array($regs[1], $func_exceptions))
{
$vars = array(
"stylesheet" => $_SYS["stylesheet"],
"file" => $errfile,
"line" => $errline,
"function" => $regs[1],
"message" => $regs[3]
);
die(Design::GetTemplateCode("s_errorbox.html", $vars));
}
}
}
}
$_SYS["wasposted"] = ($_SERVER["REQUEST_METHOD"] == "POST");
# Instatiate Cache and Error control classes
$cache = new PageCache;
$GLOBALS["error"] = new ErrorHandler;
mysql_connect($_DB["server"], $_DB["user"], $_DB["pass"]) or die(mysql_error());
mysql_select_db($_DB["database"]) or die(mysql_error());
if ($_SERVER["QUERY_STRING"] == "logout") User::Disconnect();
# If auto-login was chosen at last login, try to authorize user.
if ($_COOKIE["ck_logintype"] == 2 && is_array($_COOKIE["ck_login"]) && ($_COOKIE["ck_explicitlogout"] != true) && !isset($_SESSION["user_id"]))
{
User::Authorize($_COOKIE["ck_login"]["username"], $_COOKIE["ck_login"]["password"], -1);
}
if (isset($_SESSION["user_id"]))
{
User::FetchUserinfo();
} else {
if (!isset($_SESSION["user_listingsize"])) $_SESSION["user_listingsize"] = $_SYS["DefaultListLength"];
}
if ($_SESSION["user_emailcode"]) $SYSTEM_NOTICE = "Your email has not yet been validated!<br><br>You can't post questions, nor replies to questions before you validate it!";
General::SetOnlineUsers();
?>
Hej forum, er der nogen som kan hjælpe mig med at løse denne fejl ??
Fatal error: Call to a member function on a non-object in /usr/www/dk-forum_dk/public_html/Eclone/validate.php on line 13
sådan ser linie 13 ud -->> $errors->SetError("profile_emailcode_wrong");
scriptet ligger her -->> http://www.dk-forum.dk/Eclone/ og fejlen kommer ved
at trykke på dette link -->> http://www.dk-forum.dk/Eclone/validate.php?email=mivs31@hotmail.com&emailcode=d8495828945fe51db428640f068f86c8
her er validate.php
Nusermivs
Hej,
Fejlen er at variablen "$errors" ikke er et object!!!
Dvs. at den ikke kan kalde funktionen SetError da objektet ikke er oprettet.
Du skal oprette $errors variablen som en "error-klasse" (klasse ligger måske i "inc.functions.php", men det kan jeg ikke se ud fra din source).
Håber det hjælper dig.
Michael.
Af skade bliver man klog, men sjældent rig
Nusermivs