Commit graph

24 commits

Author SHA1 Message Date
Gina Peter Banyard
6600d0e00f
ext/intl: Refactor error handling (#19196)
This is a comprehensive refactoring of the error mechanism of the Intl extension.

By moving the prefixing of the current method/function being executed to actual error message creation by accessing the execution context, we get the following benefits:
- Accurate error messages indicating *what* call caused the error
  - As we *always* "copy" the message, the `copyMsg` arg becomes unused, meaning we can reduce the size of the `intl_error` struct by 4 bytes.
  - Saving it as a zend_string means we know the length of the message
- Remove the need to pass around a "function name" `char*` across multiple calls
- Use Intl's exception mechanism to generate exceptions for constructor call
  - This removes the need for replacing the error handler
  - Which didn't do anything anyway in silent mode, which required throwing non-descriptive exceptions
2025-07-30 16:00:37 +01:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Máté Kocsis
f7fbc6333f
Add more precise type info for stubs
Closes GH-6005
2020-09-01 16:35:56 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Anatol Belski
f59b201f19 Fixed bug #74385 Locale::parseLocale() broken with some arguments
Rely on the ICU's defined values for the max locale id length.
2018-05-03 16:34:33 +02:00
Daniel Persson
e3b160bf86 Added function to check error and return null if error is set. 2016-04-08 12:31:19 +02:00
Dmitry Stogov
f7b6de5b5e Cleanup (avoid string reallocations) 2015-07-01 13:26:39 +03:00
Nikita Popov
e74b84a9fe Fix Intl constructor leaks
Drop the Z_OBJ(return_value) = NULL hack and return status code
from ctor function instead.
2015-04-17 10:33:59 +02:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Stanislav Malyshev
82f3d36583 cleanup intl types 2014-12-29 14:06:12 -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
Xinchen Hui
499293449b Fixed segfault in intlgregcal_create_instance 2014-06-29 22:56:27 +08:00
Xinchen Hui
3b7e19ad73 Fixed segfault 2014-06-29 15:53:42 +08:00
Xinchen Hui
b53bc5c762 Fixed segfaults 2014-06-28 20:52:41 +08:00
Xinchen Hui
4fbaddb4f8 Refactoring ext/intl (incompleted) 2014-06-28 00:02:50 +08:00
Christopher Jones
a61f5bf925 Revert "Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type""
This reverts commit f38bd22ed2.
2013-08-22 08:57:18 -07:00
Christopher Jones
f38bd22ed2 Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type" 2013-08-21 15:06:23 -07:00
Gustavo André dos Santos Lopes
9762609cec Remove executable bit from files 2012-07-30 10:25:17 +02:00
Stanislav Malyshev
0cb1c2797f little errors cleanup 2009-05-10 19:10:36 +00:00
Stanislav Malyshev
a3c422974b fix // comments 2009-01-29 21:49:49 +00:00
Stanislav Malyshev
d54c396dca refactor ctors, cleanup code 2008-07-22 20:23:47 +00:00
Stanislav Malyshev
44326938eb - increase max locale to 80
- add some macros
2008-07-14 06:42:11 +00:00
Stanislav Malyshev
0d16b1516b Merge intl extension into core 2008-07-07 22:51:04 +00:00