Skip to content

Commit

Permalink
Merge pull request #233 from dsnopek/drupal-779-create-node
Browse files Browse the repository at this point in the history
Prevent PHP warning when creating a node with Drupal 7.79 and it's new field storage optimization
  • Loading branch information
jhedstrom authored May 7, 2021
2 parents 864e994 + e0c31c4 commit c6fc5ea
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Drupal/Driver/Cores/Drupal7.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public function clearCache() {
* {@inheritdoc}
*/
public function nodeCreate($node) {
// Set original if not set.
if (!isset($node->original)) {
$node->original = clone $node;
}

// Assign authorship if none exists and `author` is passed.
if (!isset($node->uid) && !empty($node->author) && ($user = user_load_by_name($node->author))) {
$node->uid = $user->uid;
Expand Down

0 comments on commit c6fc5ea

Please sign in to comment.