|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-28 12:30 UTC] tony2001@php.net
[2006-03-28 14:26 UTC] mauroi at digbang dot com
[2006-04-21 04:11 UTC] wez@php.net
[2006-04-21 13:33 UTC] mauroi at digbang dot com
[2006-04-30 01:29 UTC] wez@php.net
[2006-05-02 18:08 UTC] mauroi at digbang dot com
[2006-12-12 13:54 UTC] mauroi at digbang dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 06:00:02 2025 UTC |
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