-
Notifications
You must be signed in to change notification settings - Fork 60
Fix Placeholder view helper return value #162
base: master
Are you sure you want to change the base?
Changes from 7 commits
991e537
c4c9488
01e0927
d00694a
c105734
087b034
4ecca91
c683c29
4be6723
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ | |
|
|
||
| namespace Zend\View\Helper; | ||
|
|
||
| use Zend\View\Exception\InvalidArgumentException; | ||
| use Zend\View\Helper\Placeholder\Container; | ||
|
|
||
| /** | ||
|
|
@@ -37,15 +36,12 @@ class Placeholder extends AbstractHelper | |
| * Placeholder helper | ||
| * | ||
| * @param string $name | ||
| * @throws InvalidArgumentException | ||
| * @return Placeholder\Container\AbstractContainer | ||
| * @return Placeholder\Container\AbstractContainer|Placeholder | ||
| */ | ||
| public function __invoke($name = null) | ||
| { | ||
| if ($name === null) { | ||
| throw new InvalidArgumentException( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This particular change is most likely a BC break. Although I don't think people actually do rely on try-catching it, it is possible that they rely on the page to be crashing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I totally agree with you. Should we move this to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Ocramius ping There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thexpand |
||
| 'Placeholder: missing argument. $name is required by placeholder($name)' | ||
| ); | ||
| return $this; | ||
| } | ||
|
|
||
| $name = (string) $name; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self