Skip to content

Commit

Permalink
Merge branch '1.0' of github.com:jhedstrom/drupaldriver into 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jhedstrom committed Dec 23, 2014
2 parents 955d235 + 37e12fe commit 377912e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Drupal/Driver/Cores/Drupal7.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ public function termCreate(\stdClass $term) {
throw new \Exception(sprintf('No "%s" vocabulary found.'));
}

// Protect against a failure from hook_taxonomy_term_insert() in pathauto.
$current_path = getcwd();
chdir(DRUPAL_ROOT);
\taxonomy_term_save($term);
chdir($current_path);

// Loading a term by name returns an array of term objects, but there should
// only be one matching term in a testing context, so take the first match
Expand Down

0 comments on commit 377912e

Please sign in to comment.