Skip to content

Commit

Permalink
*Fix ORM getter/setter generation error
Browse files Browse the repository at this point in the history
Getter/Setters were being generated as `setFieldName-($value)`. The hypen (-) after the field name causes the scripts to fail
  • Loading branch information
STC-Steven authored Aug 16, 2017
1 parent 002d386 commit fd465c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Phalcon/Builder/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ public function build()
$attributes[] = $this->snippet->getAttributes($type, $useSettersGetters ? 'protected' : 'public', $field, $this->options->has( 'annotate' ), $fieldName);

if ($useSettersGetters) {
$methodName = Utils::camelize($field->getName(). '_-');
$methodName = Utils::camelize($field->getName(), '_-');
$setters[] = $this->snippet->getSetter($fieldName, $type, $methodName);

if (isset($this->_typeMap[$type])) {
Expand Down

0 comments on commit fd465c3

Please sign in to comment.