[Solar-svn] Revision 3243
pmjones at solarphp.com
pmjones at solarphp.com
Sat Jul 26 10:30:41 CDT 2008
Solar_Uri: [CHG] Only set $this->_request if not already set. Child classes (e.g. Solar_Uri_Action, in a forthcoming commit) may have already set it.
Modified: trunk/Solar/Uri.php
===================================================================
--- trunk/Solar/Uri.php 2008-07-26 14:55:17 UTC (rev 3242)
+++ trunk/Solar/Uri.php 2008-07-26 15:30:41 UTC (rev 3243)
@@ -260,11 +260,13 @@
*/
public function __construct($config = null)
{
- // real construction
parent::__construct($config);
- // get the current request environment
- $this->_request = Solar_Registry::get('request');
+ // get the current request environment. may already have been set by
+ // extended classes.
+ if (! $this->_request) {
+ $this->_request = Solar_Registry::get('request');
+ }
// fix the base path by adding leading and trailing slashes
if (trim($this->_config['path']) == '') {
More information about the Solar-svn
mailing list