Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a4

Bug #14151 setDateTime references variables which are not passed to the method
Submitted: 2008-06-16 15:44 UTC
From: pfeigl Assigned:
Status: Verified Package: Date (version 1.5.0a1)
PHP Version: Irrelevant OS: CentOS
Roadmaps: (Not assigned)    
Subscription  


 [2008-06-16 15:44 UTC] pfeigl (Philipp Feigl)
Description: ------------ setDateTime references variables within its method body like $d, $m or $y, while the variables passed to the method are called differnt, like $pn_day, $pn_month, $pn_year. Test script: --------------- $date->setDateTime($day, $month, $year, $hour, $minute, $second); Expected result: ---------------- setDateTime changes values of the date object Actual result: -------------- Error occurs, that the provided values are no valid date values

Comments

 [2008-07-21 12:50 UTC] doconnor (Daniel O'Connor)
Test <?php require_once 'Date.php'; $date = new Date(); $a = $date->format('%d/%m/%Y %H.%M.%S%O (%Z)'); $date->setDateTime(1, 1, 1970, 1, 2, 3); $b = $date->format('%d/%m/%Y %H.%M.%S%O (%Z)'); assert($a != $b); print $a . "\n"; print $b . "\n";