浏览代码

Merge pull request #472 from n1c01a5/master

Fix an error to setting var
Christophe Coevoet 12 年之前
父节点
当前提交
0add69ccb0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/Gedmo/Loggable/LoggableListener.php

+ 1 - 1
lib/Gedmo/Loggable/LoggableListener.php

@@ -238,8 +238,8 @@ class LoggableListener extends MappedEventSubscriber
             }
             }
             $uow = $om->getUnitOfWork();
             $uow = $om->getUnitOfWork();
             $logEntry->setObjectId($objectId);
             $logEntry->setObjectId($objectId);
+            $newValues = array();
             if ($action !== self::ACTION_REMOVE && isset($config['versioned'])) {
             if ($action !== self::ACTION_REMOVE && isset($config['versioned'])) {
-                $newValues = array();
                 foreach ($ea->getObjectChangeSet($uow, $object) as $field => $changes) {
                 foreach ($ea->getObjectChangeSet($uow, $object) as $field => $changes) {
                     if (!in_array($field, $config['versioned'])) {
                     if (!in_array($field, $config['versioned'])) {
                         continue;
                         continue;