Commit Graph

628 Commits

Author SHA1 Message Date
Adam Baratz
0eeb06bf17 Addendum to #73234: Assume param types are nullable 2016-10-12 11:59:01 -04:00
Adam Baratz
6ddfce116b Fix tests affected by 32b6154a61 2016-10-11 10:15:50 -04:00
Adam Baratz
0785a5e6dc Fix message typos in PDO tests 2016-08-24 18:39:37 -04:00
Xinchen Hui
3f1e9ed8f8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
  Remove typo'd commit
  Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
2016-08-09 11:32:34 +08:00
Keyur
a74c7cb528 Remove typo'd commit 2016-08-09 01:36:15 +00:00
Keyur
3f25c4228a Fix bug 72788: Invalid memory access when database_object_handle
is undefined. Also fix memory leak in dbh_free when using persistent
PDO connections.
2016-08-09 00:16:46 +00:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Nikita Popov
b2245c5592 Merge branch 'PHP-7.0' 2016-02-13 17:48:58 +01:00
Nikita Popov
f43fe8cb4c Merge branch 'PHP-5.6' into PHP-7.0 2016-02-13 17:48:17 +01:00
Nikita Popov
adcdb4f7ba Fix test description 2016-02-13 17:46:24 +01:00
Nikita Popov
464f48ec1c Merge branch 'PHP-7.0' 2016-02-13 15:21:38 +01:00
Nikita Popov
70c8db08c6 Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/pdo_mysql/mysql_driver.c
2016-02-13 15:21:16 +01:00
Nikita Popov
bc419fee5c FIx bug #71569
convert_to_string() may result in an interned string.
2016-02-13 15:17:51 +01:00
Nikita Popov
93dc91b386 Remove version checks
PHP_VERSION_ID
PHP_API_VERSION
ZEND_MODULE_API_NO
PHP_MAJOR_VERSION, PHP_MINOR_VERSION
ZEND_ENGINE_2

I've left litespeed alone, as it seems to genuinely maintain support
for many PHP versions.
2016-01-30 15:35:28 +01:00
Xinchen Hui
c1b73ff8af Merge branch 'PHP-7.0' 2016-01-04 05:39:20 -08:00
Xinchen Hui
36b4311edd Do not edit the value in place (might be relates to #71261) 2016-01-04 05:38:15 -08:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Julien Pauli
5adac3c2d0 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed and improved tests
  test to function socket_getopt();
  test to function socket_clear_error();;
  test to function socket_shutdown();
  test to function socket_send();
  test to function gethostname ( void );
  test to function DateTimeZone::getLocation();
  test to function stream_get_transports();
  test to function stream_get_wrappers();
  test to function stream_socket_enable_crypto();
  test to function stream_socket_get_name();
  Create stream_socket_recvfrom.phpt
  test to stream function set_file_buffer.phpt();
  test to function PDO_getAvaliableDrivers;
  test to misc. function connection_status();
  test to function connection_aborted();
  test to function memory_get_peak_usage();
2015-12-24 14:13:36 +01:00
Julien Pauli
048fb4b00f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed and improved tests
  test to function socket_getopt();
  test to function socket_clear_error();;
  test to function socket_shutdown();
  test to function socket_send();
  test to function gethostname ( void );
  test to function DateTimeZone::getLocation();
  test to function stream_get_transports();
  test to function stream_get_wrappers();
  test to function stream_socket_enable_crypto();
  test to function stream_socket_get_name();
  Create stream_socket_recvfrom.phpt
  test to stream function set_file_buffer.phpt();
  test to function PDO_getAvaliableDrivers;
  test to misc. function connection_status();
  test to function connection_aborted();
  test to function memory_get_peak_usage();
2015-12-24 14:08:59 +01:00
Julien Pauli
d73d9fecf6 Fixed and improved tests 2015-12-24 14:08:44 +01:00
marcosptf
4f528e5c95 test to function PDO_getAvaliableDrivers;
was add new function to PDO::getAvailableDrivers
2015-12-24 10:45:39 +01:00
Xinchen Hui
5bdc5f4e2b Merge branch 'PHP-7.0' 2015-11-16 17:59:54 +08:00
Xinchen Hui
9134f9e98f Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/mysql/php_mysql.c
2015-11-16 17:59:46 +08:00
Xinchen Hui
be6fd4ba89 Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction)
Actually, this only be fixed if php uses mysqlnd
2015-11-16 16:59:55 +08:00
Andrey Hristov
0a7e08d385 MNDR:
- cleanup in mysqlnd_result.c
- switch from zend_ulong to size_t for lengths. Accordingly change
  mysqli and pdo_mysql for this.
2015-11-12 16:19:16 +01:00
Anatol Belski
01c844a01d use Z* macro name 2015-11-05 22:39:10 +01:00
Anatol Belski
1406f80135 fix leak 2015-11-05 21:49:21 +01:00
Anatol Belski
7b32b8f4e1 fix pdo_mysql crash with empty bound stream param
rel #70862
2015-11-05 21:32:31 +01:00
Daniel Persson
73384728ca Fix bug #64172
Check if the SQLSTATE error code is equal to PDO_ERR_NONE before we ask the driver.
And if no error is reported skip the extra call to the driver.
2015-10-18 17:06:54 -07:00
Daniel Persson
307c1f6bf0 Fix bug #64172
Check if the SQLSTATE error code is equal to PDO_ERR_NONE before we ask the driver.
And if no error is reported skip the extra call to the driver.
2015-10-18 17:03:39 -07:00
Dmitry Stogov
ccb677ece8 Fixed test running on MarinaDB. 2015-10-07 12:21:43 +03:00
Xinchen Hui
014abbc840 Merge branch 'PHP-5.6'
Conflicts:
	ext/pdo/pdo_dbh.c
	ext/pdo/php_pdo_driver.h
2015-08-30 05:32:37 -07:00
Xinchen Hui
ef1bd8f0e6 Fixed bug #70389 (PDO constructor changes unrelated variables) 2015-08-30 05:02:38 -07:00
Anatol Belski
4ad0714d76 fork test 2015-08-20 13:32:29 +02:00
Xinchen Hui
dca6d1027a Fixed bug #70272 (Segfault in pdo_mysql) 2015-08-18 18:33:07 +08:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Nikita Popov
5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski
fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Dmitry Stogov
70c86732cb Use zend_string to represent pdo_column_data.name and avoid duplication. 2015-05-05 16:19:51 +03:00
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Nikita Popov
30d59aed1c Try fixing PDO MySQL pconnect test
Use less aggressive conversion to exceptions, in particular
do not convert warnings that happen during check_liveness. If the
server has gone away this will just reconnect and we still end up
with a valid connection, so it shouldn't throw.

Also drop some unnecessary checks for malloc returning NULL.
2015-04-04 16:00:17 +02:00
Ferenc Kovacs
956fa034e3 Merge branch 'PHP-5.6'
* PHP-5.6:
  sigh, can't even copypaste without screwing up
2015-04-02 00:07:20 +02:00