1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Commit Graph

415 Commits

Author SHA1 Message Date
Dmitry Stogov 4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Gustavo André dos Santos Lopes 2acbe4c93e - Fixed borked refactoring in r307437 (using SUCCESS/FAILURE return instead of
out parameter).
- Fixed signature of php_stream_copy_to_stream_ex to return int in 5.4/trunk
  instead of size_t, as the function only returns SUCCESS/FAILURE.
2011-09-04 22:36:33 +00:00
Xinchen Hui ba9546b8e5 Omitted GCC warning "comparison is always false" 2011-08-12 07:47:03 +00:00
Xinchen Hui 64fc565765 Avoiding strcpy, strcat, sprintf usage to make static analyzer happy 2011-08-09 12:16:58 +00:00
Stanislav Malyshev fa78f7a4c0 retore open_basedir check for unlink 2011-07-31 22:43:21 +00:00
Pierre Joye db25201ffb - Fixed bug 55124, recursive mkdir fails with current (dot) directory in path 2011-07-26 17:44:20 +00:00
Gustavo André dos Santos Lopes afe4570cda - Fixed bug #52935 (call exit in user_error_handler cause stream relate core). 2011-07-05 16:09:06 +00:00
Ilia Alshanetsky a311dc2443 Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). 2011-06-05 21:57:01 +00:00
Hannes Magnusson 9392b9cd73 Fixed bug #54946 (stream_get_contents infinite loop) 2011-05-29 12:29:19 +00:00
Stanislav Malyshev 5c9080d3a6 implement streams metadata API per RFC 2011-05-25 21:03:55 +00:00
Gustavo André dos Santos Lopes 8dfe15a12e - Fixed accidental change. 2011-05-01 04:16:28 +00:00
Gustavo André dos Santos Lopes 93f65cdeac - Fixed bug #54623 (Segfault when when writing to a persistent socket after
closing a copy of the socket).
2011-05-01 03:57:01 +00:00
Pierrick Charron 1368364469 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Gustavo André dos Santos Lopes 7f2937223d - Make fclose() actually close stream, even when the resource refcount is > 1.
This reverts the fix for bug #24557.
- Make php_stream_free delete the stream from the resources list, not merely
  decrease its refcount, as a single call to zend_list_delete does.           
#Not worth the risk merging to 5.3. While change #2 may prevent some segfaults,
#a quick and dirty survey to the codebase only showed calls to php_stream_close
#or php_stream_free on streams allocated in the same function, which would have
#refcount == 1. May be reconsidered.
2011-03-21 02:58:54 +00:00
Gustavo André dos Santos Lopes a3a5157286 - PHP_STREAM_OPTION_WRITE_BUFFER no longer disables the read buffer of a plain
stream when 0 is given as the value.
- PHP_STREAM_OPTION_WRITE_BUFFER no longer changes the chunk size in socket
  streams.
- Added stream_set_chunk_size() function.
- Some signedness fixes.
- Test for commit r308474, now that it's possible to actually test it.
2011-02-19 01:28:37 +00:00
Gustavo André dos Santos Lopes 3759331276 - Changed return value in userspace stream set_option to "not implemented",
instead of failure.
#Currently, there's no way to test this, because the only operations that have
#a default implementation, set_chunk_size and set_read_buffer are either not
#exposed or, in the 2nd case, completely delegated to the user implementation,
#which can only return true/false, not "not implemented" (and not implementing
#the set_option method in the userspace stream results in error).
2011-02-18 17:53:26 +00:00
Gustavo André dos Santos Lopes 9bbc114b59 - Classes that implement stream wrappers can define a method called
stream_truncate that will respond to truncation, e.g. through ftruncate.
  Closes feature request #53888.
2011-02-17 00:25:32 +00:00
Adam Harvey 2b4fb94e8e Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
2011-02-04 10:47:41 +00:00
Gustavo André dos Santos Lopes 1f49902999 - Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
2011-02-01 22:55:17 +00:00
Gustavo André dos Santos Lopes c6ccc43285 - Fixed several comparisons that always result in true of false
due to signedness of one of the operands, either by removing
  dead code or fixing it.
- Thrown some comments around in php_stream_get_record.
- See http://www.mail-archive.com/internals@lists.php.net/msg49525.html
2011-02-01 18:11:16 +00:00
Pierre Joye 657c934513 - don't continue if no valid option value 2011-01-20 07:38:00 +00:00
Pierre Joye 966a82c776 - no need of assert here 2011-01-20 06:32:59 +00:00
Ilia Alshanetsky 93fd1bf53f Fixed variable re-declaration 2011-01-13 12:56:28 +00:00
Felipe Pena 0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Gustavo André dos Santos Lopes 5a1b77422a - Reverted unintended change. 2010-11-19 23:42:44 +00:00
Gustavo André dos Santos Lopes e10454ded8 - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream).
2010-11-15 18:22:52 +00:00
Gustavo André dos Santos Lopes 3a02cfb675 - Added leak_variable() function.
- Added mechanism to force outer streams to be closed before their inner ones.
- Fixed temp:// streams only handling correctly (through an ad hoc mechanism)  reverse closing order
  when the  inner stream is of type memory.
2010-11-15 03:05:32 +00:00
Gustavo André dos Santos Lopes d37e1ea243 - Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
  exported and movied it from php_streams.h to
  php_streams_int.h.
2010-11-05 18:53:48 +00:00
Gustavo André dos Santos Lopes 0a35133524 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00
Gustavo André dos Santos Lopes a1888f585c - Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
  and when there was data in the buffer before the emulation started. Also made
  more consistent its behavior -- should return failure every time less data
  than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
  invalid call to the seek handler or read handler. in _php_stream_seek.
2010-10-13 03:13:29 +00:00
Pierre Joye ed58636f00 - use TSRMLS_D/C with php_stream_context_alloc 2010-09-16 09:33:42 +00:00
Pierre Joye daa90813fb - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert, missing header 2010-09-16 09:18:46 +00:00
Pierre Joye aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Felipe Pena feda017cce - Fixed bug #49215 (make fails on glob_wrapper) 2010-09-10 21:33:50 +00:00
Pierre Joye ada5423308 - WS 2010-09-01 10:16:48 +00:00
Pierre Joye dec8593fac - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Kalle Sommer Nielsen 159cd6916d Fixed compiler warnings in main/ 2010-08-17 12:49:19 +00:00
Pierre Joye 3a19fee38b - #51854, fix logic (patch by Tjerk) 2010-05-18 19:39:39 +00:00
Kalle Sommer Nielsen dd8e59da8f Removed safe_mode
* Removed ini options, safe_mode*
 * Removed --enable-safe-mode --with-exec-dir configure options on Unix
 * Updated extensions, SAPI's and core
 * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Pierre Joye c264445a37 - WS 2010-04-08 07:55:35 +00:00
Michael Wallner 5b277c4da0 add backlock socket context option for stream_socket_server(),
which had a hardcoded backlog of 5 at two occurrances
2010-03-11 16:37:24 +00:00
Pierre Joye acc6609a27 - get the right error on windows 2010-02-21 17:44:25 +00:00
Pierre Joye 658e86b847 - prevent unexpectable behaviors (for the user) with invalid path 2010-02-07 20:15:58 +00:00
Pierre Joye b7aee13069 - removed debug breakpoint and improve inline comment 2010-01-27 02:03:41 +00:00
Pierre Joye 6925763347 - prevent bad things to happen when invalid path are passed to MoveFileEx 2010-01-27 01:18:43 +00:00
Pierre Joye 573c33b3b7 - [DOC] #45986, bad file descriptor warning when rename is used with invalid path, add php_win32_docref2_from_error to display system error for non posix api 2010-01-26 20:04:03 +00:00
Jani Taskinen 3d733ce6fa - Fixed bug #50791 (Compile failure: Bad logic in defining fopencookie emulation) 2010-01-19 13:44:08 +00:00
Jani Taskinen 95a4f5fabe - WS + CS fixes 2010-01-19 12:03:07 +00:00
Ilia Alshanetsky 7e1f29e930 Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). 2010-01-18 12:50:08 +00:00
Ilia Alshanetsky d5b2007bed Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but returns false). 2010-01-06 12:54:53 +00:00