~clint-fewbar/ubuntu/natty/php5/merge-5.3.3-3

« back to all changes in this revision

Viewing changes to ext/pdo/pdo_dbh.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-01-26 14:09:58 UTC
  • mfrom: (1.1.16 upstream) (0.3.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100126140958-sos69zwa00q2nt19
Tags: 5.2.12.dfsg.1-2ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/control, debian/rules: Disable a few build dependencies and
    accompanying binary packages which we do not want to support in main:
    + firebird2-dev/php5-interbase (we have a seperate php-interbase source)
    + libc-client/php5-imap (we have a seperate php-imap source)
    + libmcrypt-dev/php5-mcrypt (seperate php-mcrypt source)
    + readline support again, now that the libedit issue is fixed.
  - debian/control: Add build dependency: libedit-dev (>= 2.9.cvs.20050518-1)
    CLI readline support.
  - debian/rules:
    + Correctly mangle PHP5_* macros for lpia
  - debian/control:
    + Rename Vcs-Browser & Vcs-Git to XS-Original-Vcs-Browser & XS-Original-Vcs-Git (LP: #323731).
  - debian/control: Move php5-suhoshin to Suggests.
  - debian/rules: Fix broken symlink for pear.
  - main/php_version.h: updated with Ubuntu version info
  - debian/patches/series: Re-enable the 033-we_WANT_libtool.patch patch
  - debian/rules, debian/source_php5.py: Install apport hook. 
* Dropped patches: CVE-2009-3557.patch and CVE-2009-3558.patch, no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
  +----------------------------------------------------------------------+
19
19
*/
20
20
 
21
 
/* $Id: pdo_dbh.c 279722 2009-05-02 15:58:39Z iliaa $ */
 
21
/* $Id: pdo_dbh.c 292083 2009-12-13 19:53:44Z felipe $ */
22
22
 
23
23
/* The PDO Database Handle Class */
24
24
 
44
44
        char *message = NULL;
45
45
        const char *msg;
46
46
 
47
 
        if (dbh->error_mode == PDO_ERRMODE_SILENT) {
 
47
        if (dbh && dbh->error_mode == PDO_ERRMODE_SILENT) {
48
48
#if 0
49
49
                /* BUG: if user is running in silent mode and hits an error at the driver level
50
50
                 * when they use the PDO methods to call up the error information, they may
71
71
                spprintf(&message, 0, "SQLSTATE[%s]: %s", *pdo_err, msg);
72
72
        }
73
73
 
74
 
        if (dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
 
74
        if (dbh && dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
75
75
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", message);
76
76
        } else {
77
77
                zval *ex, *info;
110
110
        char *message = NULL;
111
111
        zval *info = NULL;
112
112
 
113
 
        if (dbh->error_mode == PDO_ERRMODE_SILENT) {
 
113
        if (dbh == NULL || dbh->error_mode == PDO_ERRMODE_SILENT) {
114
114
                return;
115
115
        }
116
116
        
1091
1091
        char *qstr;
1092
1092
        int qlen;
1093
1093
 
1094
 
        if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, "s|l", &str, &str_len,
1095
 
                        &paramtype)) {
 
1094
        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, &str_len, &paramtype)) {
1096
1095
                RETURN_FALSE;
1097
1096
        }
1098
1097