[PHP-BUG] Bug #61858 [NEW]: DOMAttr debug info generates E_WARNING

2012-04-26 Thread sala...@php.net
From: salathe
Operating system: 
PHP version:  5.4.1
Package:  DOM XML related
Bug Type: Bug
Bug description:DOMAttr debug info generates E_WARNING

Description:

Trying var_dump()/print_r() a DOMAttr prints an E_WARNING message "Not yet

implemented".

Test script:
---
loadXML('Test');

$example = $doc->getElementsByTagName('example')->item(0);
$attr= $example->getAttributeNode('a');

var_dump($attr);
print_r($attr);


Expected result:

object(DOMAttr)#2 (20) {
  ["name"]=>
  string(1) "a"
  ["specified"]=>
  bool(true)
  ["value"]=>
  string(1) "b"
  ["ownerElement"]=>
  string(22) "(object value omitted)"
  ["schemaTypeInfo"]=>
  NULL
  ["nodeName"]=>
  string(1) "a"
  ["nodeValue"]=>
  string(1) "b"
  ["nodeType"]=>
  int(2)
  ["parentNode"]=>
  string(22) "(object value omitted)"
  ["childNodes"]=>
  string(22) "(object value omitted)"
  ["firstChild"]=>
  string(22) "(object value omitted)"
  ["lastChild"]=>
  string(22) "(object value omitted)"
  ["previousSibling"]=>
  NULL
  ["attributes"]=>
  NULL
  ["ownerDocument"]=>
  string(22) "(object value omitted)"
  ["namespaceURI"]=>
  NULL
  ["prefix"]=>
  string(0) ""
  ["localName"]=>
  string(1) "a"
  ["baseURI"]=>
  string(1) "/"
  ["textContent"]=>
  string(1) "b"
}
DOMAttr Object
(
[name] => a
[specified] => 1
[value] => b
[ownerElement] => (object value omitted)
[schemaTypeInfo] => 
[nodeName] => a
[nodeValue] => b
[nodeType] => 2
[parentNode] => (object value omitted)
[childNodes] => (object value omitted)
[firstChild] => (object value omitted)
[lastChild] => (object value omitted)
[previousSibling] => 
[attributes] => 
[ownerDocument] => (object value omitted)
[namespaceURI] => 
[prefix] => 
[localName] => a
[baseURI] => /
[textContent] => b
)


Actual result:
--
Warning: var_dump(): Not yet implemented in /tmp/php-OE78FO on line 9
object(DOMAttr)#2 (20) {
  ["name"]=>
  string(1) "a"
  ["specified"]=>
  bool(true)
  ["value"]=>
  string(1) "b"
  ["ownerElement"]=>
  string(22) "(object value omitted)"
  ["schemaTypeInfo"]=>
  NULL
  ["nodeName"]=>
  string(1) "a"
  ["nodeValue"]=>
  string(1) "b"
  ["nodeType"]=>
  int(2)
  ["parentNode"]=>
  string(22) "(object value omitted)"
  ["childNodes"]=>
  string(22) "(object value omitted)"
  ["firstChild"]=>
  string(22) "(object value omitted)"
  ["lastChild"]=>
  string(22) "(object value omitted)"
  ["previousSibling"]=>
  NULL
  ["attributes"]=>
  NULL
  ["ownerDocument"]=>
  string(22) "(object value omitted)"
  ["namespaceURI"]=>
  NULL
  ["prefix"]=>
  string(0) ""
  ["localName"]=>
  string(1) "a"
  ["baseURI"]=>
  string(1) "/"
  ["textContent"]=>
  string(1) "b"
}
DOMAttr Object

Warning: print_r(): Not yet implemented in /tmp/php-OE78FO on line 10
(
[name] => a
[specified] => 1
[value] => b
[ownerElement] => (object value omitted)
[schemaTypeInfo] => 
[nodeName] => a
[nodeValue] => b
[nodeType] => 2
[parentNode] => (object value omitted)
[childNodes] => (object value omitted)
[firstChild] => (object value omitted)
[lastChild] => (object value omitted)
[previousSibling] => 
[attributes] => 
[ownerDocument] => (object value omitted)
[namespaceURI] => 
[prefix] => 
[localName] => a
[baseURI] => /
[textContent] => b
)


-- 
Edit bug report at https://bugs.php.net/bug.php?id=61858&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=61858&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=61858&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=61858&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=61858&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61858&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=61858&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=61858&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=61858&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=61858&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=61858&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=61858&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=61858&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=61858&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=61858&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=61858&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=61858&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=6

#49032 [NEW]: SplFileObject::fscanf pass-by-reference values

2009-07-23 Thread sala...@php.net
From: sala...@php.net
Operating system: OS X 10.5
PHP version:  5.3.0
PHP Bug Type: SPL related
Bug description:  SplFileObject::fscanf pass-by-reference values

Description:

SplFileObject::fscanf should behave identically to fscanf but that does
not appear to be the case. When attempting to provide variables into which
values should be assigned, the script either warns of undefined variables
(when passing apparently by value?) or throws out call-time
pass-by-reference E_DEPRECATED errors (when forcing pass-by-reference).

Reproduce code:
---
// fruits.txt
apple,100
banana,21

Pass by value:
eof()) {
var_dump($file->fscanf("%[a-z],%d", $fruit, $quantity), $fruit,
$quantity);
}
?>

Pass by reference:
eof()) {
var_dump($file->fscanf("%[a-z],%d", &$fruit, &$quantity), $fruit,
$quantity);
}
?>

Expected result:

Pass by value (the method definition should take variables by reference):

int(2)
string(5) "apple"
int(100)
int(2)
string(6) "banana"
int(21)

Pass by reference:

Should report E_DEPRECATED call-time pass-by reference. Which it does.

Actual result:
--
Pass by value:


Notice:  Undefined variable: fruit in fruits.php on line
4

Notice:  Undefined variable: quantity in fruits.php on line
4

Notice:  Undefined variable: fruit in fruits.php on line
4

Notice:  Undefined variable: quantity in fruits.php on line
4
int(2)
NULL
NULL

Notice:  Undefined variable: fruit in fruits.php on line
4

Notice:  Undefined variable: quantity in fruits.php on line
4

Notice:  Undefined variable: fruit in fruits.php on line
4

Notice:  Undefined variable: quantity in fruits.php on line
4
int(2)
NULL
NULL




Pass by reference:

Deprecated:  Call-time pass-by-reference has been deprecated in
fruits.php on line 4

Deprecated:  Call-time pass-by-reference has been deprecated in
fruits.php on line 4

Warning:  Cannot modify header information - headers already sent
by (output started at fruits.php:4) in fruits.php on line
1
int(2)
string(5) "apple"
int(100)
int(2)
string(6) "banana"
int(21)



-- 
Edit bug report at http://bugs.php.net/?id=49032&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49032&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49032&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49032&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49032&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49032&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49032&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49032&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49032&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49032&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49032&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49032&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49032&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49032&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49032&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49032&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49032&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49032&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49032&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49032&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49032&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49032&r=mysqlcfg



#49755 [NEW]: iterator_to_array nukes DirectoryIterator

2009-10-02 Thread sala...@php.net
From: sala...@php.net
Operating system: OS X
PHP version:  5.3.0
PHP Bug Type: SPL related
Bug description:  iterator_to_array nukes DirectoryIterator

Description:

When converting a DirectoryIterator instance into an array using
iterator_to_array, the array items appear to be converted to basic
DirectoryIterator instances with none of the file information intact. The
same does not appear to occur for other related classes
(FilesystemIterator, RecursiveDirectoryIterator).

Reproduce code:
---
getFilename());
}

echo "RecursiveDirectoryIterator:\n";
$rdit = new RecursiveDirectoryIterator(dirname(__FILE__));
$ait = iterator_to_array($rdit);
foreach ($ait as $file) {
var_dump($file->getFilename());
}

?>

Expected result:

DirectoryIterator:
string(1) "."
string(2) ".."
string(7) "bug.php"
RecursiveDirectoryIterator:
string(7) "bug.php"


Actual result:
--
DirectoryIterator:
string(0) ""
string(0) ""
string(0) ""
RecursiveDirectoryIterator:
string(7) "bug.php"


-- 
Edit bug report at http://bugs.php.net/?id=49755&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49755&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49755&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49755&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49755&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49755&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49755&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=49755&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=49755&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=49755&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=49755&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=49755&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=49755&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=49755&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49755&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=49755&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=49755&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=49755&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=49755&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=49755&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=49755&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=49755&r=mysqlcfg



#51119 [NEW]: Incorrect exception message in FilterIterator

2010-02-22 Thread sala...@php.net
From: sala...@php.net
Operating system: OS X
PHP version:  5.3.2RC2
PHP Bug Type: SPL related
Bug description:  Incorrect exception message in FilterIterator

Description:

The lower bound of the offset parameter for the FilterIterator is zero (no
offset). When an offset less than zero is given, an OutOfBoundsException is
thrown, incorrectly stating, "Parameter offset must be > 0".

Reproduce code:
---
getMessage() . "\n";
}

try {
$lit = new LimitIterator($ait, -1);
echo "OK\n";
} catch (OutOfRangeException $e) {
echo $e->getMessage() . "\n";
}


Expected result:

OK
Parameter offset must be >= 0

Actual result:
--
OK
Parameter offset must be > 0

-- 
Edit bug report at http://bugs.php.net/?id=51119&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51119&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51119&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51119&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51119&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51119&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51119&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=51119&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=51119&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=51119&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=51119&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=51119&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=51119&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=51119&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51119&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=51119&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=51119&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=51119&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=51119&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=51119&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=51119&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=51119&r=mysqlcfg



Req #48767 [PATCH]: SplFileInfo::getExtension()

2010-11-17 Thread sala...@php.net
Edit report at http://bugs.php.net/bug.php?id=48767&edit=1

 ID: 48767
 Patch added by: sala...@php.net
 Reported by:helmertz at gmail dot com
 Summary:SplFileInfo::getExtension()
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   All
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: splfileinfo-getextension-trunk
Revision:   1290029692
URL:   
http://bugs.php.net/patch-display.php?bug=48767&patch=splfileinfo-getextension-trunk&revision=1290029692


Previous Comments:

[2009-07-02 06:57:20] helmertz at gmail dot com

Description:

SplFileInfo::getExtension() should be alias for pathinfo($file,
PATHINFO_EXTENSION), to put as much functionality in classes as
possible.

Reproduce code:
---
---

>From manual page: class.splfileinfo

---

$file = new SplFileInfo('monkey.gif');

echo $file->getExtension();

Expected result:

gif

Actual result:
--
Sorry but I don't get this box, I'm too noob.






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


Req #48767 [PATCH]: SplFileInfo::getExtension()

2010-11-25 Thread sala...@php.net
Edit report at http://bugs.php.net/bug.php?id=48767&edit=1

 ID: 48767
 Patch added by: sala...@php.net
 Reported by:helmertz at gmail dot com
 Summary:SplFileInfo::getExtension()
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   All
 PHP Version:5.3.0
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: getextension-trunk
Revision:   1290690591
URL:   
http://bugs.php.net/patch-display.php?bug=48767&patch=getextension-trunk&revision=1290690591


Previous Comments:

[2010-11-17 22:34:53] sala...@php.net

The following patch has been added/updated:

Patch Name: splfileinfo-getextension-trunk
Revision:   1290029692
URL:   
http://bugs.php.net/patch-display.php?bug=48767&patch=splfileinfo-getextension-trunk&revision=1290029692


[2009-07-02 06:57:20] helmertz at gmail dot com

Description:

SplFileInfo::getExtension() should be alias for pathinfo($file,
PATHINFO_EXTENSION), to put as much functionality in classes as
possible.

Reproduce code:
---
---

>From manual page: class.splfileinfo

---

$file = new SplFileInfo('monkey.gif');

echo $file->getExtension();

Expected result:

gif

Actual result:
--
Sorry but I don't get this box, I'm too noob.






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


[PHP-BUG] Bug #54909 [NEW]: Relative weekday modifications reset time values.

2011-05-23 Thread sala...@php.net
From: 
Operating system: Linux
PHP version:  5.3.6
Package:  Date/time related
Bug Type: Bug
Bug description:Relative weekday modifications reset time values.

Description:

Date modifications utilizing the "weekdays" keyword change the resulting
date to 

have zero values for hour/minute/second units.  Prior to PHP 5.3.6, the
time 

values were unaffected.

Test script:
---
modify('10 weekdays');

echo $dt->format('r');



?>

Expected result:

Tue, 24 May 2011 12:34:56 +

Actual result:
--
Tue, 24 May 2011 00:00:00 +

-- 
Edit bug report at http://bugs.php.net/bug.php?id=54909&edit=1
-- 
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54909&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54909&r=trysnapshot53
Try a snapshot (trunk):  
http://bugs.php.net/fix.php?id=54909&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54909&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54909&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54909&r=alreadyfixed
Need backtrace:  
http://bugs.php.net/fix.php?id=54909&r=needtrace
Need Reproduce Script:   
http://bugs.php.net/fix.php?id=54909&r=needscript
Try newer version:   
http://bugs.php.net/fix.php?id=54909&r=oldversion
Not developer issue: 
http://bugs.php.net/fix.php?id=54909&r=support
Expected behavior:   
http://bugs.php.net/fix.php?id=54909&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=54909&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=54909&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54909&r=globals
PHP 4 support discontinued:  http://bugs.php.net/fix.php?id=54909&r=php4
Daylight Savings:http://bugs.php.net/fix.php?id=54909&r=dst
IIS Stability:   
http://bugs.php.net/fix.php?id=54909&r=isapi
Install GNU Sed: 
http://bugs.php.net/fix.php?id=54909&r=gnused
Floating point limitations:  
http://bugs.php.net/fix.php?id=54909&r=float
No Zend Extensions:  
http://bugs.php.net/fix.php?id=54909&r=nozend
MySQL Configuration Error:   
http://bugs.php.net/fix.php?id=54909&r=mysqlcfg



[PHP-BUG] Bug #55686 [NEW]: DateTime object getting stuck on Feb 29th

2011-09-13 Thread sala...@php.net
From: salathe
Operating system: 
PHP version:  trunk-SVN-2011-09-13 (SVN)
Package:  Date/time related
Bug Type: Bug
Bug description:DateTime object getting stuck on Feb 29th

Description:

Some dates falling on February 29th in negative years can not have an
interval of 
one day added to them.

The pattern appears to be years of the form -n16, but some years behave as

expected (e.g. -816 and -416 in the test script below).

Test script:
---
setDate($i, 2, 29);

// Rolled over into March, no Feb 29th, skip
if ($date->format('M') !== 'Feb') {
continue;
}

$next = clone $date;
$next->add(new DateInterval('P1D'));

if ($date->format('Y-m-d') === $next->format('Y-m-d')) {
echo $next->format('Y-m-d l') . PHP_EOL;
}
}

?>

Expected result:

No output is expected.

Actual result:
--
-0916-02-29 Friday
-0716-02-29 Tuesday
-0616-02-29 Sunday
-0516-02-29 Friday
-0316-02-29 Tuesday
-0216-02-29 Sunday
-0116-02-29 Friday

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55686&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=55686&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=55686&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=55686&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=55686&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55686&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=55686&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=55686&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=55686&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=55686&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=55686&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=55686&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=55686&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=55686&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=55686&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=55686&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=55686&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=55686&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=55686&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=55686&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=55686&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=55686&r=mysqlcfg



[PHP-BUG] Bug #55687 [NEW]: DateTime "Unknown" day of week

2011-09-13 Thread sala...@php.net
From: salathe
Operating system: 
PHP version:  trunk-SVN-2011-09-13 (SVN)
Package:  Date/time related
Bug Type: Bug
Bug description:DateTime "Unknown" day of week

Description:

For lots of negative-year dates, the day of the week is reported as
"Unknown". 
Sundays (0th day) are okay. The most modern date affected appears to be
-0007-10-
01.

The test script below runs through each day in the year -10 as an example.

Test script:
---
format('D') === 'Unknown') {
echo $date->format('Y-m-d D') . PHP_EOL;
}
}

?>

Expected result:

No output is expected.

Actual result:
--
-0010-01-01 Unknown
-0010-01-02 Unknown
-0010-01-03 Unknown
-0010-01-04 Unknown
-0010-01-05 Unknown
-0010-02-01 Unknown
-0010-02-02 Unknown
-0010-03-01 Unknown
-0010-03-02 Unknown
-0010-05-01 Unknown
-0010-05-02 Unknown
-0010-05-03 Unknown
-0010-05-04 Unknown
-0010-06-01 Unknown
-0010-08-01 Unknown
-0010-08-02 Unknown
-0010-08-03 Unknown
-0010-10-01 Unknown
-0010-10-02 Unknown
-0010-10-03 Unknown
-0010-10-04 Unknown
-0010-10-05 Unknown
-0010-11-01 Unknown
-0010-11-02 Unknown

-- 
Edit bug report at https://bugs.php.net/bug.php?id=55687&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=55687&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=55687&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=55687&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=55687&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55687&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=55687&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=55687&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=55687&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=55687&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=55687&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=55687&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=55687&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=55687&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=55687&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=55687&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=55687&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=55687&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=55687&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=55687&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=55687&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=55687&r=mysqlcfg



[PHP-BUG] Bug #60089 [NEW]: DateTime::createFromFormat() U after u nukes microtime

2011-10-18 Thread sala...@php.net
From: 
Operating system: 
PHP version:  trunk-SVN-2011-10-18 (SVN)
Package:  Date/time related
Bug Type: Bug
Bug description:DateTime::createFromFormat() U after u nukes microtime

Description:

A format string containing a Unix timestamp at any point after a
microsecond value 
leaves the microseconds unset in the resulting DateTime object.

Test script:
---
format('U
u'));

?>

Expected result:

string(16) "123456790 123456"


Actual result:
--
string(16) "123456790 00"


-- 
Edit bug report at https://bugs.php.net/bug.php?id=60089&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60089&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60089&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60089&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60089&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60089&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60089&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60089&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60089&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60089&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60089&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60089&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60089&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60089&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60089&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60089&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60089&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60089&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60089&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60089&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60089&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60089&r=mysqlcfg



Bug #60089 [PATCH]: DateTime::createFromFormat() U after u nukes microtime

2011-10-18 Thread sala...@php.net
Edit report at https://bugs.php.net/bug.php?id=60089&edit=1

 ID: 60089
 Patch added by: sala...@php.net
 Reported by:sala...@php.net
 Summary:DateTime::createFromFormat() U after u nukes
 microtime
 Status: Assigned
 Type:   Bug
 Package:Date/time related
 PHP Version:trunk-SVN-2011-10-18 (SVN)
 Assigned To:derickr
 Block user comment: N
 Private report: N

 New Comment:

The following patch has been added/updated:

Patch Name: trunk-60089-quickfix
Revision:   1318972043
URL:
https://bugs.php.net/patch-display.php?bug=60089&patch=trunk-60089-quickfix&revision=1318972043


Previous Comments:

[2011-10-18 21:03:32] sala...@php.net

Description:

A format string containing a Unix timestamp at any point after a microsecond 
value 
leaves the microseconds unset in the resulting DateTime object.

Test script:
---
format('U u'));

?>

Expected result:

string(16) "123456790 123456"


Actual result:
--
string(16) "123456790 00"







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