Explorar o código

Merge pull request #148 from danielholmes/patch-1

Fixes last patch: https://github.com/l3pp4rd/DoctrineExtensions/commit/1437382a171f9a421e3f7220d3f989bc49cc37f5
Gediminas Morkevicius %!s(int64=14) %!d(string=hai) anos
pai
achega
e6de895ac6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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.");
                 }