|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-10 21:43 UTC] johannes@php.net
[2007-08-11 04:21 UTC] donauinsel at hotmail dot com
[2007-08-11 06:33 UTC] donauinsel at hotmail dot com
[2007-08-13 09:22 UTC] donauinsel at hotmail dot com
[2007-08-13 09:46 UTC] donauinsel at hotmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 00:00:02 2025 UTC |
Description: ------------ Try first $month = 11,$year = 2007 then $month =12, $year = 2007 Function returns correct value which seems not to be passed correctly. Reproduce code: --------------- function fixdate(&$month, &$year) { if ($month < 1) { $month = 12; $year--; } elseif ($month > 12) { $month = 1; $year++; } } fixdate($nextmonth = ($month + 1), $nextyear = ($year + 0)); Expected result: ---------------- 12 / 2007 or 01 / 2008 Actual result: -------------- you will get 13 / 2007 instead.