Development

Changeset 24511

You must first sign up to be able to contribute.

Changeset 24511

Show
Ignore:
Timestamp:
11/28/09 23:57:36 (3 years ago)
Author:
FabianLange
Message:

[1.2, 1.3, 1.4] correctly closing output buffering in case of exceptions while requiring a file in sfPHPView (fixes #7596)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/view/sfPHPView.class.php

    r20606 r24511  
    7676    ob_start(); 
    7777    ob_implicit_flush(0); 
    78     require($_sfFile); 
     78 
     79    try 
     80    { 
     81      require($_sfFile); 
     82    } 
     83    catch (Exception $e) 
     84    { 
     85      // need to end output buffering before throwing the exception #7596 
     86      ob_end_clean(); 
     87      throw $e; 
     88    } 
    7989 
    8090    return ob_get_clean(); 
  • branches/1.3/lib/view/sfPHPView.class.php

    r23810 r24511  
    7676    ob_start(); 
    7777    ob_implicit_flush(0); 
    78     require($_sfFile); 
     78 
     79    try 
     80    { 
     81      require($_sfFile); 
     82    } 
     83    catch (Exception $e) 
     84    { 
     85      // need to end output buffering before throwing the exception #7596 
     86      ob_end_clean(); 
     87      throw $e; 
     88    } 
    7989 
    8090    return ob_get_clean(); 
  • branches/1.4/lib/view/sfPHPView.class.php

    r23922 r24511  
    7070    ob_start(); 
    7171    ob_implicit_flush(0); 
    72     require($_sfFile); 
     72 
     73    try 
     74    { 
     75      require($_sfFile); 
     76    } 
     77    catch (Exception $e) 
     78    { 
     79      // need to end output buffering before throwing the exception #7596 
     80      ob_end_clean(); 
     81      throw $e; 
     82    } 
    7383 
    7484    return ob_get_clean();