Development

Changeset 12997

You must first sign up to be able to contribute.

Changeset 12997

Show
Ignore:
Timestamp:
11/14/08 07:48:24 (8 months ago)
Author:
fabien
Message:

[1.1] 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.1/lib/test/sfTestBrowser.class.php

    r9253 r12997  
    511511  if (($errno & error_reporting()) == 0) 
    512512  { 
    513     return
     513    return false
    514514  } 
    515515 
     
    518518  { 
    519519    case E_WARNING: 
    520       throw new Exception(sprintf($msg, 'warning')); 
     520      $msg = printf($msg, 'warning'); 
     521      throw new Exception($msg); 
    521522      break; 
    522523    case E_NOTICE: 
    523       throw new Exception(sprintf($msg, 'notice')); 
     524      $msg = printf($msg, 'notice'); 
     525      throw new Exception(); 
    524526      break; 
    525527    case E_STRICT: 
    526       throw new Exception(sprintf($msg, 'strict')); 
     528      $msg = printf($msg, 'strict'); 
     529      throw new Exception($msg); 
    527530      break; 
    528531    case E_RECOVERABLE_ERROR: 
    529       throw new Exception(sprintf($msg, 'catchable')); 
     532      $msg = printf($msg, 'catchable'); 
     533      throw new Exception($msg); 
    530534      break; 
    531535  } 
     536 
     537  return false; 
    532538} 
    533539 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.