| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2007, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
copy_bt_args(old_exception, new_exception TSRMLS_CC);
copy_bt_args(old_exception, sub_exception TSRMLS_CC);
}
-
+#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3
+ Z_ADDREF_P(old_exception);
+ zend_exception_set_previous(new_exception, old_exception TSRMLS_CC);
+#endif
zval_ptr_dtor(&old_exception);
return new_exception;
}
memcpy(*body + *length, buf, len);
*length += len;
(*body)[*length] = '\0';
+ if (len < (int) sizeof(buf)) {
+ break;
+ }
}
/* check for error */
while (0 < (len = sapi_module.read_post(buf, sizeof(buf) TSRMLS_CC))) {
php_stream_write(s, buf, len);
+ if (len < (int) sizeof(buf)) {
+ break;
+ }
}
if (len < 0) {