Skip to content

Commit

Permalink
MAGETWO-32026: [GitHub] Invalid backend frontname During Installation #…
Browse files Browse the repository at this point in the history
…823

- Change based on CR feedback.
  • Loading branch information
Safwan Khan authored and eddielau committed Jan 9, 2015
1 parent 73a1b59 commit ca9684e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testUnsetData()

/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Empty backend frontname provided.
* @expectedExceptionMessage No backend frontname provided.
*/
public function testEmptyData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ class BackendConfig extends AbstractSegment
*/
public function __construct(array $data)
{
if (!isset($data[self::KEY_FRONTNAME])) {
throw new \InvalidArgumentException("No backend frontname provided.");
}
if (empty($data[self::KEY_FRONTNAME])) {
throw new \InvalidArgumentException("Empty backend frontname provided.");
throw new \InvalidArgumentException("No backend frontname provided.");
}
if (!preg_match('/^[a-zA-Z0-9_]+$/', $data[self::KEY_FRONTNAME])) {
throw new \InvalidArgumentException("Invalid backend frontname {$data[self::KEY_FRONTNAME]}");
Expand Down

0 comments on commit ca9684e

Please sign in to comment.