Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #707 from gunnarlium/bugfix-sluggable-fails-when-s…

…tring-is-empty

Fix accidental type conversion in sluggable behavior.
  • Loading branch information...
commit 2580de6cb441bf2ca936810a6ca15c5eee4c37fe 2 parents faa11d0 + 0cfa3db
@willdurand willdurand authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  generator/lib/behavior/sluggable/SluggableBehavior.php
View
2  generator/lib/behavior/sluggable/SluggableBehavior.php
@@ -370,7 +370,7 @@ protected function makeSlugUnique(\$slug, \$separator = '" . $this->getParameter
}
\$slugNum = substr(\$object->" . $getter . "(), strlen(\$slug) + 1);
- if (0 == \$slugNum[0]) {
+ if ('0' === \$slugNum[0]) {
\$slugNum[0] = 1;
}
Please sign in to comment.
Something went wrong with that request. Please try again.