1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Commit Graph

93 Commits

Author SHA1 Message Date
Xinchen Hui 7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Sammy Kaye Powers 9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Adam Baratz 82fe200a3f Remove dead code 2016-10-17 17:07:10 -04:00
Adam Baratz 0eeb06bf17 Addendum to #73234: Assume param types are nullable 2016-10-12 11:59:01 -04:00
Adam Baratz 32b6154a61 Fix #73234: Emulated statements let value dictate parameter type
The prepared statement emulator (pdo_sql_parser.*) figures out how to quote
each query parameter. The intended type is specified by the PDO::PARAM_*
consts, but this direction wasn't always followed. In practice, queries could
work as expected, but subtle errors could result. For example, a numeric string
bound as PDO::PARAM_INT would be sent to a driver's quote function. While these
functions are told which type is expected, they generally assume values are
being quoted as strings. This can result in implicit casts, which are bad for
performance.

This commit includes the following changes:
 - Cast values marked as bool/int/null to the appropriate type and bypass the
   driver's quote function.
 - Save some memory by dropping the temporary zval used for casting.
 - Avoid a memory leak if the driver's quote function produces an error.
 - Appropriate test suite updates.
2016-10-10 18:16:17 -04:00
Dmitry Stogov 323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Matteo Beccati 4090e709aa Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #71447 (Quotes inside comments not properly handled)
  Fixed a few PDO tests to conform to PDO Common standards
  news entry #69537
  Fix #69537: __debugInfo with empty string for key gives error

Conflicts:
	Zend/zend_compile.c
2016-04-05 00:07:02 +02:00
Matteo Beccati 30925cd498 Fixed bug #71447 (Quotes inside comments not properly handled) 2016-04-04 23:50:28 +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
Fabian Franz 1fcadf67e6 Fix setting of empty string resource. 2015-11-05 19:47:12 +01:00
Anatol Belski a80545992b update the actual sql parser file for #70861 2015-11-05 14:46:40 +01:00
Dmitry Stogov 4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
olshevskiy87 8bdec7a248 fix typos
Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
2015-05-13 22:28:35 +04:00
Dmitry Stogov 1eb4352143 Use new ZEND_HASH_FOREACH_... API. 2015-02-10 15:43:12 +03:00
Stanislav Malyshev 598c935245 update the .re file for PDO 2015-01-27 13:48:24 -08:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui 0579e8278d bump year 2015-01-15 23:26:37 +08:00
Stanislav Malyshev b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Johannes Schlüter d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski 63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Dmitry Stogov b108267f2c Merge branch 'master' into phpng
* master: (41 commits)
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  NEWS
  Fix Request #67453 Allow to unserialize empty data.
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
  Fix patch for bug #67436
  fix failed test
  Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
  Added tests for bug 67436
  Fixed wrong XFAIL test - already fixed
  Fix typo in Bug #67406 NEWS entry
  Fix typo in Bug #67406 NEWS entry
  ...

Conflicts:
	Zend/zend_compile.c
	ext/session/session.c
	ext/standard/array.c
	ext/standard/http_fopen_wrapper.c
	tests/classes/bug63462.phpt
2014-06-18 17:50:27 +04:00
Lior Kaplan e667d23178 Update copyright year for re2c files as well 2014-06-16 23:26:50 +03:00
Xinchen Hui 204e580fcd Fixed Hash API usage 2014-05-18 20:25:07 +08:00
Xinchen Hui 4ababc3a41 Fixed Hash API usage (it's in comments) 2014-05-18 12:09:14 +08:00
Pierre Joye 9b44d687df fix zend_hash_get_current_data_ptr_ex call 2014-05-17 05:41:21 +02:00
Xinchen Hui be79628b87 Fixed REFERENCE handling 2014-05-08 16:11:50 +08:00
Xinchen Hui 5f46c8fa31 Fixed bugs in pdo_mysql 2014-05-08 15:19:43 +08:00
Dmitry Stogov 17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Xinchen Hui bdfef93b42 Refactor PDO (only compilable now) 2014-04-22 18:23:03 +08:00
Rasmus Lerdorf 890ea8411f Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings 2013-11-07 18:05:08 -08:00
Michael Wallner 27c803aaed Fix bug #64953 (Postgres prepared statement positional parameter casting) 2013-08-20 19:19:02 +02:00
Veres Lajos ed2e84e239 typo fixes (accommodate, parameter) 2013-06-10 13:36:03 -07:00
Xinchen Hui 0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Johannes Schlüter 1b78aef426 Fix bug #61755 parsing bug can lead to access violations 2012-04-19 12:46:02 +02:00
Felipe Pena e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Ilia Alshanetsky 42f3972e61 Avoid strcpy() usage 2011-08-08 00:07:54 +00:00
Ilia Alshanetsky 34f08a3715 Fixes for variety of issues identified by coverity scan 2011-08-07 23:46:00 +00:00
Felipe Pena 087a134b50 - Fixed bug #54929 (Parse error with single quote in sql comment) 2011-06-04 22:54:40 +00:00
Felipe Pena 927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Sebastian Bergmann ebb467ff02 sed -i "s#1997-2009#1997-2010#g" **/*.re **/*.y **/*.l 2010-01-03 08:22:14 +00:00
Sebastian Bergmann 3c1ed020c7 MFH: Bump copyright year, 2 of 3. 2008-12-31 11:13:54 +00:00
Felipe Pena c29ebd8a23 - MFH: Better fix 2008-11-13 18:14:50 +00:00
Felipe Pena 494dbdb1c1 - MFH: Fixed invalid reads 2008-11-13 13:08:12 +00:00
Felipe Pena 981a23fff3 - MFH: Fixed bug #43925 (Incorrect argument counter in prepared statements with pgsql) 2008-10-23 18:53:05 +00:00
Felipe Pena 1f54af9245 MFH:
- Fixed bug #44251 (Question mark and an escaped singel quote lead to an exception)
- Fixed bug #41125 (PDO mysql + quote() + prepare() can result in seg fault)
  Patch by: tsteiner at nerdclub dot net
2008-10-10 12:10:41 +00:00
Sebastian Bergmann f8a8196d63 MFH: Bump copyright year, 1 of 2. 2007-12-31 07:15:43 +00:00