When I had these two lines in my code:
if ($executed == "The command didn't exist") {
$this->core->error("In CommandRenderAl lActionsInAnArr ay we sought
the command '$commandName' but ExteriorCommand s could not find it. It
returned the value: '$executed'.", "CommandRenderA llActionsInAnAr ray");
I was getting this on screen:
# CommandRenderAl lActionsInAnArr ay threw this error: In
CommandRenderAl lActionsInAnArr ay we sought the command
'checkToSeeIfTh isIsTheFirstLog in' but ExteriorCommand s could not find
it. It returned the value: '1'.
But if I change the first line to this:
if ($executed === "The command didn't exist") {
then it works correctly.
Why does this need 3 equal signs? Why doesn't 2 suffice? I've done
string comparisons before and I've never had to use 3 equal signs
before.
if ($executed == "The command didn't exist") {
$this->core->error("In CommandRenderAl lActionsInAnArr ay we sought
the command '$commandName' but ExteriorCommand s could not find it. It
returned the value: '$executed'.", "CommandRenderA llActionsInAnAr ray");
I was getting this on screen:
# CommandRenderAl lActionsInAnArr ay threw this error: In
CommandRenderAl lActionsInAnArr ay we sought the command
'checkToSeeIfTh isIsTheFirstLog in' but ExteriorCommand s could not find
it. It returned the value: '1'.
But if I change the first line to this:
if ($executed === "The command didn't exist") {
then it works correctly.
Why does this need 3 equal signs? Why doesn't 2 suffice? I've done
string comparisons before and I've never had to use 3 equal signs
before.
Comment