-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another fix to non-null falsy value handling in View
- Loading branch information
1 parent
d3042eb
commit 3f625a5
Showing
4 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* @method static string|Page|NullPage page($source, $args = []) Static getter (factory) method for Pages. | ||
* @method static string|null partial(string $partial_name, array $args = []) Static getter (factory) method for Partials. | ||
* | ||
* @version 0.21.1 | ||
* @version 0.21.2 | ||
* @author Teppo Koivula <[email protected]> | ||
* @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/ | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
* @property ViewPlaceholders|null $placeholders ViewPlaceholders object. | ||
* @property Partials|null $partials Object containing partial paths. | ||
* | ||
* @version 0.8.1 | ||
* @version 0.8.2 | ||
* @author Teppo Koivula <[email protected]> | ||
* @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/ | ||
*/ | ||
|
@@ -125,6 +125,9 @@ public function __get($key) { | |
} | ||
$value = $this->get($key); | ||
if ($value === null) { | ||
if (isset($this->data[$key]) && $this->data[$key] !== null) { | ||
return $this->data[$key]; | ||
} | ||
$value = $this->getFromController($key); | ||
} | ||
return $value; | ||
|