Hmm Strange :/
I tried
<? if ($character = $armory->getCharacter($charname)) {
echo "The if statement evaluated to true";
} else {
echo "The if statement evaluated to false";
}?>
And no matter what character name i add in true or false it just keeps coming back with "The if statement evaluated to true"
function __construct($region, $realm, $character, $ignoreFields = FALSE) {
if ($ignoreFields != FALSE){
$this->excludeFields($ignoreFields);
}
$this->region = strtolower($region);
$this->realm = $realm;
$this->name = $character;
$jsonConnect = new jsonConnect();
$this->characterData = $jsonConnect->getCharacter($character, $realm, $region, implode(",",$this->fields));
if ($this->characterData != FALSE){
$this->name = $this->characterData['name'];
$this->setTitles();
$this->setTalentTreeSelected();
$this->race = new Races($region);
$this->class = new Classes($region);
} else {
return FALSE;
}
return TRUE;
}
That seems to be the isolated section from the API class file , not sure if that will help at all