Skip to content

Commit

Permalink
Merge pull request #168 from lpeabody/bug/user_not_set
Browse files Browse the repository at this point in the history
"I am viewing my :type (content )with the title :title" generates notice on anonymous user
  • Loading branch information
jhedstrom committed May 6, 2015
2 parents 507882b + ef37db3 commit cba0911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drupal/DrupalExtension/Context/DrupalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function createNode($type, $title) {
* @Given I am viewing my :type (content )with the title :title
*/
public function createMyNode($type, $title) {
if (!$this->user->uid) {
if (!isset($this->user->uid)) {
throw new \Exception(sprintf('There is no current logged in user to create a node for.'));
}

Expand Down

0 comments on commit cba0911

Please sign in to comment.