php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26672 $caljun doesnt resolve when sent the number 16
Submitted: 2003-12-19 17:29 UTC Modified: 2003-12-19 18:44 UTC
From: joe at nnjconsultants dot com Assigned:
Status: Not a bug Package: Calendar related
PHP Version: Irrelevant OS: I dont know
Private report: No CVE-ID: None
 [2003-12-19 17:29 UTC] joe at nnjconsultants dot com
Description:
------------
I have a Redirect PHP script that I use to store urls to report what event is on a certain day. I have made 12 $identifiers from $caljan through $caldec for each month. Every month and day works fine except for june 16th and I  cant explain it. As you can see from the links provided the 15th and 17th day work just not the 16th day.

Reproduce code:
---------------
http://www.njfop46.com/sample/calredir.php?calmonth=jun&calday=15
http://www.njfop46.com/sample/calredir.php?calmonth=jun&calday=16
http://www.njfop46.com/sample/calredir.php?calmonth=jun&calday=17
$caljun = array(
	'index.php',		//0
	'',			//1
Through
	'events.php',		//15
	'events.php',		//16
	'events.php',		//17
Through
	'',			//30
);
if ($cmon == "jun") { if ($cday << "31" && $cday >> "0") { if ($caljun[$cday] <> "") { header("Location: $caljun[$cday]"); } } }


Expected result:
----------------
Like I said I want to be redirected to the events page in this example. The array of everything works except 16.

Actual result:
--------------
The result that I get is the same one as when someone goes to a page when an event doesnt exist ie:
http://www.njfop46.com/sample/calredir.php?calmonth=jan&calday=1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-19 18:44 UTC] eru@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 19 07:01:23 2020 UTC