Permalink
Browse files

Using ctype_upper to allow owner-property.

  • Loading branch information...
1 parent 09caeba commit 69d87b357307b0afe6b8b5490269e00f5001bb41 @gabordemooij committed Dec 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 RedBean/OODBBean.php
View
@@ -392,7 +392,7 @@ public function &__get( $property ) {
$this->properties[$property] = $bean;
return $this->properties[$property];
}
- if (strpos($property,'own')===0) {
+ if (strpos($property,'own')===0 && ctype_upper(substr($property,3))) {
$type = (__lcfirst(str_replace('own','',$property)));
if ($this->aliasName) {
$myFieldLink = $this->aliasName.'_id';
@@ -408,7 +408,7 @@ public function &__get( $property ) {
$this->setMeta('tainted',true);
return $this->properties[$property];
}
- if (strpos($property,'shared')===0) {
+ if (strpos($property,'shared')===0 && ctype_upper(substr($property,3))) {
$type = (__lcfirst(str_replace('shared','',$property)));
$keys = $toolbox->getRedBean()->getAssociationManager()->related($this,$type);
if (!count($keys)) $beans = array(); else

0 comments on commit 69d87b3

Please sign in to comment.