PDA

View Full Version : No errors, just a blank page?


FounderSim
10-04-2014, 12:44 PM
So my tester/explore page works then but when I add the method investigate, I can't even access the tester/explore page. Its just blank. I have checked and rechecked both the controller and view for sytanx errors and can't seem to find any. I noticed sometimes if I will not be alerted of any error if I dont pass two variables to certain functions in mysidia so I checked all them as well because that usually results in a blank page as well.

The Controller:

public function investigate(){
$mysidia = Registry::get("mysidia");

$explore_var = $mysidia->session->fetch("explorer");

if($explore_var == 0)
{
$this->setField("explorer", new String("Stupid Hacker..."));
}
else
{
$mysidia->session->assign("explorer_step", 2);
$stmt = $mysidia->db->select("explorer", array("eType"), "eid={$explore_var}");
$result = $stmt->fetchObject();

if($result->eType == "item")
{
$this->setField("explorer", new String($result->eType));
}
elseif($result->eType == "coin")
{
$this->setField("explorer", new String($result->eType)));
}
elseif($result->eType == "pet")
{
$this->setField("explorer", new String($result->eType));
}
else
{
$this->setField("explorer", new String("boo"));
}
}
}



The View

public function investigate(){
$mysidia = Registry::get("mysidia");
$document = $this->document;


$document->setTitle("TEST");


$emessages = $this->getField("explorer");


switch($emessages)
{
//manual edit of comments during paist of this code =)
case "item":
$document->add(new Comment('Ooh/a>'));
break;
case "pet":
$document->add(new Comment('oh/a>'));
break;
case "coin":
$document->add(new Comment('Ooh">Continue</a>'));
break;
default:
$document->add(new Comment($emessages));
}
}

IntoRain
10-04-2014, 01:46 PM
Some errors are logged in the error_log file, the newer ones should be at the bottom, are there any related to those files?

FounderSim
10-04-2014, 01:53 PM
It would be nice if I had a error_log file =)

IntoRain
10-04-2014, 02:13 PM
You have an extra ) there:

elseif($result->eType == "coin")
{
$this->setField("explorer", new String($result->eType)));//here
}

FounderSim
10-04-2014, 02:55 PM
woops. I guess thats why an extra set of eyes ALWAYS helps especially when you dont have error reporting or error logs.

IntoRain
10-04-2014, 04:15 PM
woops. I guess thats why an extra set of eyes ALWAYS helps especially when you dont have error reporting or error logs.

It's always these little typos that are easy to miss xD