Development

Changeset 12996

You must first sign up to be able to contribute.

Changeset 12996

Show
Ignore:
Timestamp:
11/14/08 07:47:07 (2 months ago)
Author:
fabien
Message:

[1.2] added a workaround to a PHP wierd behavior where classes are not autoload within an Exception constructor

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/test/sfTestFunctionalBase.class.php

    r11920 r12996  
    522522    if (($errno & error_reporting()) == 0) 
    523523    { 
    524       return
     524      return false
    525525    } 
    526526 
     
    529529    { 
    530530      case E_WARNING: 
    531         throw new Exception(sprintf($msg, 'warning')); 
     531        $msg = printf($msg, 'warning'); 
     532        throw new RuntimeException($msg); 
    532533        break; 
    533534      case E_NOTICE: 
    534         throw new Exception(sprintf($msg, 'notice')); 
     535        $msg = printf($msg, 'notice'); 
     536        throw new RuntimeException(); 
    535537        break; 
    536538      case E_STRICT: 
    537         throw new Exception(sprintf($msg, 'strict')); 
     539        $msg = printf($msg, 'strict'); 
     540        throw new RuntimeException($msg); 
    538541        break; 
    539542      case E_RECOVERABLE_ERROR: 
    540         throw new Exception(sprintf($msg, 'catchable')); 
     543        $msg = printf($msg, 'catchable'); 
     544        throw new RuntimeException($msg); 
    541545        break; 
    542546    } 
     547 
     548    return false; 
    543549  } 
    544550