Commit Graph

111 Commits

Author SHA1 Message Date
Christoph M. Becker
7816df2c57 Elevate warnings to ValueErrors in ext/calendar
All of these warnings/ValueErrors are due to programming errors, i.e.
calling a function with unsupported arguments.
2019-10-31 08:49:15 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Simon Podlipsky
3b2329dae9 Add Calendar ext PHP stubs
Closes GH-4552.
2019-08-20 15:15:52 +02:00
Christoph M. Becker
f50c460723 Don't explicitly set return value on ZPP failure in ext/calendar
Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return
value is useless, and also slightly confusing.
2019-08-17 14:23:11 +02:00
Peter Kokot
6926cf356e Replace Hebrew characters with escape sequences
calendar.c includes ISO-8859-8 encoded Hebrew characters, which may
cause compile errors, and is causing issues when saving file as UTF-8.
This patch replaces characters with appropriate escape sequences.

Following 99fdf5916e.
2019-02-23 22:17:15 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
856b63a632 Avoid double copying 2018-03-06 21:59:02 +03:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Edgar R. Sandi
ebdbebee29
pull-request/2456:
increase test coverage in calendar extension
    consistent warnings in calendar extension
2017-04-08 11:37:10 +01:00
Anatol Belski
8bc2155bf9 bring the year back 2017-01-04 13:01:55 +01:00
Anatol Belski
0439ffa2ea revert change in the broken file 2017-01-04 13:01:23 +01:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Joe Watkins
2d865dfd35 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  news entry for calendar overflow fix
  Fix integer overflow in calender.
2016-11-12 17:35:24 +00:00
Joshua Rogers
1b8cfaf23d Fix integer overflow in calender.
Fix int overflows in conversation functions for calendar.
Add tests for the overflows.
2016-11-12 17:33:51 +00:00
Christoph M. Becker
09b5a453c1 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-29 01:27:51 +02:00
Christoph M. Becker
293dd3d701 Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
#	ext/calendar/calendar.c
2016-07-29 01:26:15 +02:00
Christoph M. Becker
f67ccd4a7b Fix #71894: AddressSanitizer: global-buffer-overflow in zif_cal_from_jd
Julian days < 347998 denote invalid Jewish calendar dates, so
cal_from_jd($jd, CAL_JEWISH) and jdmonthname($jd, CAL_MONTH_JEWISH) should
actually fail. For BC we don't yet let them though, but we fix the OOB read
that happens in this case, and we also adjust cal_from_jd()'s return value
to have empty strings for "abbrevdayname" and "dayname" instead of "Sun"/
"Sunday" and NULL for "dow" instead of 0, which doesn't make any sense.
2016-07-29 01:04:21 +02:00
Christoph M. Becker
28ade0e102 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-28 19:25:22 +02:00
Christoph M. Becker
7c412688f4 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-28 19:22:40 +02:00
Christoph M. Becker
7ab39e2fae Fix #67976: cal_days_month() fails for final month of the French calendar
The French calendar ends on 0014-13-05, so trying to calculate the Julian
day of 0015-01-01 fails. We cater to that by returning the hard-coded value.
2016-07-28 19:13:58 +02:00
Anatol Belski
a35adb8b22 fix missing header and conflicting symbol 2016-07-26 14:00:24 +02:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03: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
Anatol Belski
ec89c85054 cleaning up the version macros 2015-03-23 20:13:59 +01: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
Ferenc Kovacs
c3b44b1175 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixes #67960 - Long/short day names reversed in jddayofweek()

Conflicts:
	ext/calendar/calendar.c
2015-01-02 10:16:37 +01:00
Greg Roach
244fc1e053 Fixes #67960 - Long/short day names reversed in jddayofweek() 2015-01-02 10:14:12 +01:00
Anatol Belski
7b6ed8db2f almost all the replacements of TSRMLS_* are done
Some places have to be yet touched as they use different/custom
macros namings for the same. Also some places in the code became
redundant now, this is the next task. To name some: ext/mysqlnd,
sapi/embed, ext/curl and some smaller places here and there.
2014-12-14 14:22:42 +01: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
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
fd279836cf ported ext/calendar 2014-08-19 10:42:01 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
krakjoe
08c4b4736e update for phpng 2014-05-10 10:02:33 +01:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Stanislav Malyshev
0826d39370 some fixes for bug#54254 2012-08-07 01:48:31 -07:00
Stanislav Malyshev
ad545949d0 fix for display of Jewish month names 2012-08-07 01:48:31 -07:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
da376383e8 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00