Changeset 13382
- Timestamp:
- 11/27/08 08:28:52 (7 months ago)
- Files:
-
- branches/1.2/lib/routing/sfObjectRoute.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2/lib/routing/sfObjectRoute.class.php
r13046 r13382 107 107 108 108 // check the related object 109 if ( is_null($this->object = $this->getObjectForParameters($this->parameters)) && (!isset($this->options['allow_empty']) || !$this->options['allow_empty']))109 if (!($this->object = $this->getObjectForParameters($this->parameters)) && (!isset($this->options['allow_empty']) || !$this->options['allow_empty'])) 110 110 { 111 111 throw new sfError404Exception(sprintf('Unable to find the %s object with the following parameters "%s").', $this->options['model'], str_replace("\n", '', var_export($this->filterParameters($this->parameters), true)))); … … 141 141 $this->objects = $this->getObjectsForParameters($this->parameters); 142 142 143 if ( is_array($this->objects) &&!count($this->objects) && isset($this->options['allow_empty']) && !$this->options['allow_empty'])143 if (!count($this->objects) && isset($this->options['allow_empty']) && !$this->options['allow_empty']) 144 144 { 145 145 throw new sfError404Exception(sprintf('No %s object found for the following parameters "%s").', $this->options['model'], str_replace("\n", '', var_export($this->filterParameters($this->parameters), true))));

