ID:               41964
 Updated by:       [EMAIL PROTECTED]
 Reported By:      al dot vazquez at gmail dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: Linux
 PHP Version:      5.2.3
 Assigned To:      derick
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2007-07-11 16:22:02] [EMAIL PROTECTED]

There is indeed a bug:

[EMAIL PROTECTED]:~$ php -r 'var_dump(date_parse("A"));'
array(12) {
  ["year"]=>
  bool(false)
  ["month"]=>
  bool(false)
  ["day"]=>
  bool(false)
  ["hour"]=>
  bool(false)
  ["minute"]=>
  bool(false)
  ["second"]=>
  bool(false)
  ["fraction"]=>
  bool(false)
  ["warning_count"]=>
  int(0)
  ["warnings"]=>
  array(0) {
  }
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
    [0]=>
    string(12) "Empty string"
  }
  ["is_localtime"]=>
  bool(false)
}

It is not an empty string...

Derick

------------------------------------------------------------------------

[2007-07-11 15:35:01] al dot vazquez at gmail dot com

Description:
------------
strtotime return the current timestamp for the values 'A Revolution in
Development' and 'a nothing'. Expected return value is false. This seems
to be tripped by the first character being the letter 'a' or 'A'
followed by a space followed by more text.

Reproduce code:
---------------
echo strtotime('Ask the Experts');
echo strtotime('A ');
echo strtotime('A');
echo strtotime('a ');
echo strtotime('a');
echo strtotime('A Revolution in Development');
echo strtotime('a nothing');

Expected result:
----------------
false
false
false
false
false
false
false

Actual result:
--------------
false
false
false
false
false
current timestamp
current timestamp


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41964&edit=1

Reply via email to