Skip to content

Commit

Permalink
fix wrong var name in error handling code
Browse files Browse the repository at this point in the history
thanks phillip for spotting this one!
  • Loading branch information
jasonpriem committed Oct 16, 2012
1 parent d3aafbd commit d4d6614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Parser.php
Expand Up @@ -147,7 +147,7 @@ private function parse()
// get the last name
$this->last = $this->name->chopWithRegex($lastRegex, 0);
if (!$this->last){
throw new Exception("Couldn't find a last name in '{$this->nameStr->getStr()}'.");
throw new Exception("Couldn't find a last name in '{$this->name->getStr()}'.");
}

// get the first initial, if there is one
Expand All @@ -156,7 +156,7 @@ private function parse()
// get the first name
$this->first = $this->name->chopWithRegex($firstRegex, 0);
if (!$this->first){
throw new Exception("Couldn't find a first name in '{$this->nameStr->getStr()}'");
throw new Exception("Couldn't find a first name in '{$this->name->getStr()}'");
}

// if anything's left, that's the middle name
Expand Down

0 comments on commit d4d6614

Please sign in to comment.