Permalink
Browse files

Prevent notice error if no parameter found. Fixes #190

  • Loading branch information...
1 parent c43415c commit 9e279b6e57b331fb390da341c91488c776350fea @willdurand willdurand committed Nov 23, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 generator/lib/model/Behavior.php
@@ -51,7 +51,7 @@ public function getName()
}
/**
- * Sets the table this behavior is applied to
+ * Sets the table this behavior is applied to
*
* @param Table $table the table this behavior is applied to
*/
@@ -72,7 +72,7 @@ public function getTable()
/**
* Sets the database this behavior is applied to
- *
+ *
* @param Database $database the database this behavior is applied to
*/
public function setDatabase(Database $database)
@@ -123,8 +123,12 @@ public function getParameters()
}
public function getParameter($name)
- {
- return $this->parameters[$name];
+ {
+ if (isset($this->parameters[$name])) {
+ return $this->parameters[$name];
+ }
+
+ return null;
}
/**

0 comments on commit 9e279b6

Please sign in to comment.