ID:               36752
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mauroi at digbang dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         PDO related
 Operating System: Win XP SP2
 PHP Version:      5CVS-2006-03-16 (snap)
-Assigned To:      
+Assigned To:      wez


Previous Comments:
------------------------------------------------------------------------

[2006-03-28 14:26:53] mauroi at digbang dot com

Yes.
The same happens.

Thanks.

------------------------------------------------------------------------

[2006-03-28 12:30:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip



------------------------------------------------------------------------

[2006-03-16 00:14:45] mauroi at digbang dot com

Description:
------------
I'm trying to create a class that provides a layer between the
programmer and the PDO native class.
When running the following code, Apache crashes. Only with the odbc PDO
driver.

Thanks in advance.


Reproduce code:
---------------
class db
{
        protected $_Handle;
        function __construct($dsn)
        {
                $this->_Handle = new PDO($dsn);
        }
        public function DoSomething()
        {
                $a = $this->_Handle->prepare('SELECT * FROM valid_table');
                echo $undefined_variable; // or any other error
        }
}

function strange($errorNumber, $errorMessage)
{
        echo $errorMessage;
        exit; // if i take this out everything works as expected
}
set_error_handler('strange');

$a = new db('odbc:valid_connection_string');
$b = $a->DoSomething();

Expected result:
----------------
The $errorMessage reported by the error handler. And the script
execution terminated.

Actual result:
--------------
Crash


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36752&edit=1

Reply via email to