Browse Source

Improve bitmasks for 3.x

dereuromark 8 years ago
parent
commit
63382a3fa0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Model/Behavior/BitmaskedBehavior.php

+ 2 - 1
src/Model/Behavior/BitmaskedBehavior.php

@@ -69,7 +69,8 @@ class BitmaskedBehavior extends Behavior {
 			$config['bits'] = false;
 		}
 		if (empty($config['bits'])) {
-			throw new RuntimeException('Bits not found for field ' . $config['field'] . ', expected pluralized static method ' . Inflector::variable(Inflector::pluralize($config['field'])) . '() on the entity.');
+			$method = Inflector::variable(Inflector::pluralize($config['field'])) . '()';
+			throw new RuntimeException('Bits not found for field ' . $config['field'] . ', expected pluralized static method ' . $method . ' on the entity.');
 		}
 		ksort($config['bits'], SORT_NUMERIC);