Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error message for mktime parameter is_dst #114

Closed
sanjay-rakholiya opened this issue Jun 30, 2016 · 1 comment
Closed

Wrong error message for mktime parameter is_dst #114

sanjay-rakholiya opened this issue Jun 30, 2016 · 1 comment
Labels
Milestone

Comments

@sanjay-rakholiya
Copy link

Hi,

I have used latest PHPCompatibility for check PHP 7 support on my legacy project code.

We have used lots of place mktime () functions, Its working fine, but phpcs reporting an error like,
The function mktime does not have a parameter is_dst in PHP version 7.0 or later

Error reporting while mktime() functions parameters with date('Y') functions used otherwise fine.

Its reporting parameter is_dst error except $case_1 even there is no 7th parameter is_dst present in below example code snippets,

`<?php

$stHour = date('H');
$arrStDt = array(date('m'), date('d'), date('Y'));
echo "\n".$case_1 = mktime($stHour, 0, 0, $arrStDt[0], $arrStDt[1], $arrStDt[2]);
echo "\n".$case_2 = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
echo "\n".$case_3 = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y') + 1);
echo "\n".$case_4 = mktime(0, 0, 0, date('m') + 1, date('d'), date('Y'));
echo "\n".$case_5 = mktime(date('H'), 0, 0, date('m'), date('d'), date('Y'));
echo "\n".$case_6 = mktime(0, 0, date('s'), date('m'), date('d'), date('Y'));
`

@wimg wimg closed this as completed in d29f9c5 Jul 1, 2016
@sanjay-rakholiya
Copy link
Author

Thanks a lot .. 👍

@jrfnl jrfnl added this to the 7.0 milestone Apr 30, 2017
@jrfnl jrfnl added the bug label Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants