Pluf Framework

Sign in or create your account | Project List | Help

Pluf Framework Commit Details

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
2828{
2929    function offsetGet($prop)
3030    {
31        if (!$this->offsetExists($prop)) {
31        try {
32            return parent::offsetGet($prop);
33        } catch (Exception $e) {
3234            return '';
3335        }
34        return parent::offsetGet($prop);
3536    }
3637
3738    function __get($prop)

Archive Download the corresponding diff file

Branches:
develop
master