Skip to content

Commit

Permalink
Fix another incorrect deprecation handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 14, 2015
1 parent 7cb92b8 commit 35e661c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/View/ViewVarsTrait.php
Expand Up @@ -88,11 +88,12 @@ public function createView($viewClass = null)
$deprecatedOptions = ['layout', 'view', 'theme', 'autoLayout', 'viewPath', 'layoutPath'];
foreach ($deprecatedOptions as $option) {
if (property_exists($this, $option)) {
$builder->{$option}($this->{$option});
$method = $option === 'viewPath' ? 'templatePath' : $option;
$builder->{$method}($this->{$option});
trigger_error(sprintf(
'Property $%s is deprecated. Use $this->viewBuilder()->%s() instead in beforeRender().',
$option,
$option
$method
), E_USER_DEPRECATED);
}
}
Expand Down

0 comments on commit 35e661c

Please sign in to comment.