|
Revision 10439, 1.5 kB
(checked in by nicolas, 5 years ago)
|
[1.1] fixed exception cannot be thrown in the sfFormField::__toString method
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
class sfRenderingFilter extends sfFilter |
|---|
| 21 |
{ |
|---|
| 22 |
|
|---|
| 23 |
* Executes this filter. |
|---|
| 24 |
* |
|---|
| 25 |
* @param sfFilterChain $filterChain The filter chain. |
|---|
| 26 |
* |
|---|
| 27 |
* @throws <b>sfInitializeException</b> If an error occurs during view initialization |
|---|
| 28 |
* @throws <b>sfViewException</b> If an error occurs while executing the view |
|---|
| 29 |
*/ |
|---|
| 30 |
public function execute($filterChain) |
|---|
| 31 |
{ |
|---|
| 32 |
|
|---|
| 33 |
$filterChain->execute(); |
|---|
| 34 |
|
|---|
| 35 |
if (sfConfig::get('sf_logging_enabled')) |
|---|
| 36 |
{ |
|---|
| 37 |
$this->context->getEventDispatcher()->notify(new sfEvent($this, 'application.log', array('Render to the client'))); |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
$response = $this->context->getResponse(); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
if (sfForm::hasToStringException()) |
|---|
| 45 |
{ |
|---|
| 46 |
throw sfForm::getToStringException(); |
|---|
| 47 |
} |
|---|
| 48 |
else if (sfFormField::hasToStringException()) |
|---|
| 49 |
{ |
|---|
| 50 |
throw sfFormField::getToStringException(); |
|---|
| 51 |
} |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
$response->send(); |
|---|
| 55 |
} |
|---|
| 56 |
} |
|---|
| 57 |
|
|---|