浏览代码

Merge pull request #148 from danielholmes/patch-1

Fixes last patch: https://github.com/l3pp4rd/DoctrineExtensions/commit/1437382a171f9a421e3f7220d3f989bc49cc37f5
Gediminas Morkevicius 14 年之前
父节点
当前提交
e6de895ac6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/Gedmo/Sluggable/SluggableListener.php

+ 1 - 1
lib/Gedmo/Sluggable/SluggableListener.php

@@ -214,7 +214,7 @@ class SluggableListener extends MappedEventSubscriber
             // if slug is changed, do further processing
             if ($needToChangeSlug) {
                 $mapping = $meta->getFieldMapping($slugFieldConfig['slug']);
-                if (!strlen(trim($slug)) && !isset($mapping['nullable']) || !$mapping['nullable']) {
+                if (!strlen(trim($slug)) && (!isset($mapping['nullable']) || !$mapping['nullable'])) {
                     throw new \Gedmo\Exception\UnexpectedValueException("Unable to find any non empty sluggable fields for slug [{$slugField}] , make sure they have something at least.");
                 }