| Date: | 2009-04-25 10:49:50 (1 year 4 months ago) |
|---|---|
| Author: | Loïc d'Anterroches |
| Commit: | 3a91a52cacbdc3fe7a7cb73814e90ce64fef40e9 |
| Message: | Improved the speed by removind a function call. It is faster to catch the exception when the index is not defined than testing for the index before getting it. |
| Files: |
src/Pluf/Template/ContextVars.php (1 diff) |
Change Details
| src/Pluf/Template/ContextVars.php | ||
|---|---|---|
| 28 | 28 | { |
| 29 | 29 | function offsetGet($prop) |
| 30 | 30 | { |
| 31 | if (!$this->offsetExists($prop)) { | |
| 31 | try { | |
| 32 | return parent::offsetGet($prop); | |
| 33 | } catch (Exception $e) { | |
| 32 | 34 | return ''; |
| 33 | 35 | } |
| 34 | return parent::offsetGet($prop); | |
| 35 | 36 | } |
| 36 | 37 | |
| 37 | 38 | function __get($prop) |
