浏览代码

allow larger slugs if necessary

euromark 11 年之前
父节点
当前提交
b346aa64ca
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Model/Behavior/SluggedBehavior.php

+ 4 - 1
Model/Behavior/SluggedBehavior.php

@@ -94,7 +94,10 @@ class SluggedBehavior extends Behavior {
 
 		if (!$this->_config['length']) {
 			$length = $table->schema()->column($this->_config['field'])['length'];
-			$this->_config['length'] = min((int)$length, 255);
+			if (!$length) {
+				$length = 255;
+			}
+			$this->_config['length'] = $length;
 		}
 
 		$this->_table = $table;