[PHP-BUG] Bug #51781 [NEW]: array index 0 problem

2010-05-10 Thread feng_evan at yahoo dot com
From: 
Operating system: windows xp
PHP version:  5.2.13
Package:  Arrays related
Bug Type: Bug
Bug description:array index 0 problem

Description:

Array index value judgments must use absolute equal?

Test script:
---
$arr = array();

$arr['0'] = 'zero';

$arr['keyword'] = 'keyword';

foreach($arr as $key => $val) {

if ($key == 'keyword') {

//if ($key === 'keyword') { //ok

echo $val."\n";

}

}

//output:zero keyword


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



Bug #51781 [Opn->Bgs]: array index 0 problem

2010-05-10 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=51781&edit=1

 ID:   51781
 Updated by:   johan...@php.net
 Reported by:  feng_evan at yahoo dot com
 Summary:  array index 0 problem
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  Arrays related
 Operating System: windows xp
 PHP Version:  5.2.13

 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

numeric indexes are stored as integers, comparing integer 0 with a
string not starting with a digit gives true as the string is casted to
an integer.



Expected, documented, behavior. Won't change.


Previous Comments:

[2010-05-10 09:35:52] feng_evan at yahoo dot com

Description:

Array index value judgments must use absolute equal?

Test script:
---
$arr = array();

$arr['0'] = 'zero';

$arr['keyword'] = 'keyword';

foreach($arr as $key => $val) {

if ($key == 'keyword') {

//if ($key === 'keyword') { //ok

echo $val."\n";

}

}

//output:zero keyword







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


[PHP-BUG] Bug #51782 [NEW]: goto - regression

2010-05-10 Thread julian dot picht at gmail dot com
From: 
Operating system: all
PHP version:  5.3.2
Package:  *General Issues
Bug Type: Bug
Bug description:goto - regression

Description:

"goto" encourages bad coding style and breaks existing code. There needs to
be a 

php.ini-option to disable this "new feature".

Test script:
---
setGoto($action, $controller, $module, $params);



if ($this->getExit()) {

$this->redirectAndExit();

}

}

[...]

}

Expected result:

should work as before 5.3.2

Actual result:
--
500 Internal Server Error in [...] Parse error: syntax error, unexpected
T_GOTO, 

expecting T_STRING in /var/www/de.tv-stars/ZendFramework-

1.5.1/library/Zend/Controller/Action/Helper/Redirector.php on line 383 

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



Bug #51782 [Opn]: goto - regression

2010-05-10 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=51782&edit=1

 ID:   51782
 Updated by:   johan...@php.net
 Reported by:  julian dot picht at gmail dot com
 Summary:  goto - regression
 Status:   Open
 Type: Bug
 Package:  *General Issues
 Operating System: all
 PHP Version:  5.3.2

 New Comment:

There is nothing broken as of 5.3.2, but 5.3.0, this addition was
discussed longtime ago. There was enough time to raise concerns this
won't be changed.


Previous Comments:

[2010-05-10 11:27:16] julian dot picht at gmail dot com

Description:

"goto" encourages bad coding style and breaks existing code. There needs
to be a 

php.ini-option to disable this "new feature".

Test script:
---
setGoto($action, $controller, $module, $params);



if ($this->getExit()) {

$this->redirectAndExit();

}

}

[...]

}

Expected result:

should work as before 5.3.2

Actual result:
--
500 Internal Server Error in [...] Parse error: syntax error, unexpected
T_GOTO, 

expecting T_STRING in /var/www/de.tv-stars/ZendFramework-

1.5.1/library/Zend/Controller/Action/Helper/Redirector.php on line 383 






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


Bug #51782 [Opn->Bgs]: goto - regression

2010-05-10 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=51782&edit=1

 ID:   51782
 Updated by:   johan...@php.net
 Reported by:  julian dot picht at gmail dot com
 Summary:  goto - regression
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  *General Issues
 Operating System: all
 PHP Version:  5.3.2

 New Comment:

.


Previous Comments:

[2010-05-10 11:57:34] johan...@php.net

There is nothing broken as of 5.3.2, but 5.3.0, this addition was
discussed longtime ago. There was enough time to raise concerns this
won't be changed.


[2010-05-10 11:27:16] julian dot picht at gmail dot com

Description:

"goto" encourages bad coding style and breaks existing code. There needs
to be a 

php.ini-option to disable this "new feature".

Test script:
---
setGoto($action, $controller, $module, $params);



if ($this->getExit()) {

$this->redirectAndExit();

}

}

[...]

}

Expected result:

should work as before 5.3.2

Actual result:
--
500 Internal Server Error in [...] Parse error: syntax error, unexpected
T_GOTO, 

expecting T_STRING in /var/www/de.tv-stars/ZendFramework-

1.5.1/library/Zend/Controller/Action/Helper/Redirector.php on line 383 






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


Bug #51773 [Opn->Fbk]: XMLWrite double encode entities

2010-05-10 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51773&edit=1

 ID:   51773
 Updated by:   ahar...@php.net
 Reported by:  jk555 at hotbox dot ru
 Summary:  XMLWrite double encode entities
-Status:   Open
+Status:   Feedback
 Type: Bug
 Package:  XML Writer
 Operating System: Win
 PHP Version:  5.3.2

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:

[2010-05-08 22:03:41] jk555 at hotbox dot ru

Description:

XMLWrite double encode entities. For example,   becomes  ,
or & becomes &

Expected result:

Entities must remains intact. 

Maybe something like $double_encode of htmlentities function will be
useful...







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


Bug #51757 [Opn->Bgs]: Division By Zero triggers Warning instead of Fatal Error

2010-05-10 Thread aharvey
Edit report at http://bugs.php.net/bug.php?id=51757&edit=1

 ID:   51757
 Updated by:   ahar...@php.net
 Reported by:  sstrat...@php.net
 Summary:  Division By Zero triggers Warning instead of Fatal
   Error
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  Math related
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

Division by zero generating a warning rather than an error has been
PHP's behaviour since at least April 1999, per a couple of minutes with
svn blame/log. I don't see much chance that we'd want to break backward
compatibility on that now.


Previous Comments:

[2010-05-06 16:23:42] sstrat...@php.net

Changed title to reflect scope of the bug.


[2010-05-06 16:14:09] sstrat...@php.net

Description:

In PHP 5.3 (and probably 5.2x as well) a division by Zero returns null
and 

squelches a warning.  The issue becomes when the return is cast to Int
as is done 

via soap service which is where I discovered this issue.

Test script:
---
http://bugs.php.net/bug.php?id=51757&edit=1


[PHP-BUG] Bug #51784 [NEW]: Segmentation fault! causes apache to crash.

2010-05-10 Thread notdefix at hotmail dot com
From: 
Operating system: 
PHP version:  Irrelevant
Package:  PCRE related
Bug Type: Bug
Bug description:Segmentation fault! causes apache to crash.

Description:

Copied from: http://nl2.php.net/preg_replace

PHP version: Unknown



preg_replace (and str_replace too) will crash php if you use ' ' (space) as
replace value for a large number of matches.



following Apache Error-Log message:



[Mon May 10 09:23:58 2010] [notice] child pid 39251 exit signal Illegal
instruction (4)



where pid 39251 was the PHP-thread processing that request.



Test script:
---
Copied from: http://nl2.php.net/preg_replace

PHP version: Unknown





For example:



$string = preg_replace('/( )+/', ' ', $string);

$string = str_replace(' ', ' ', $string);



will crash if $string contains many seperate matches of ' ' producing






$string = preg_replace('/( )+/', '', $string);

$string = str_replace(' ', '', $string);



or



$string = preg_replace('/( )+/', '_', $string);

$string = str_replace(' ', '_', $string);



do all work fine.







This seems to be a bug in the underlying PCRE implementation, and not in
PHP itself.


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



Bug #51784 [Opn->Bgs]: Segmentation fault! causes apache to crash.

2010-05-10 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=51784&edit=1

 ID:  51784
 Updated by:  paj...@php.net
 Reported by: notdefix at hotmail dot com
 Summary: Segmentation fault! causes apache to crash.
-Status:  Open
+Status:  Bogus
 Type:Bug
 Package: PCRE related
 PHP Version: Irrelevant

 New Comment:

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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:

[2010-05-10 13:52:12] notdefix at hotmail dot com

Description:

Copied from: http://nl2.php.net/preg_replace

PHP version: Unknown



preg_replace (and str_replace too) will crash php if you use ' ' (space)
as replace value for a large number of matches.



following Apache Error-Log message:



[Mon May 10 09:23:58 2010] [notice] child pid 39251 exit signal Illegal
instruction (4)



where pid 39251 was the PHP-thread processing that request.



Test script:
---
Copied from: http://nl2.php.net/preg_replace

PHP version: Unknown





For example:



$string = preg_replace('/( )+/', ' ', $string);

$string = str_replace(' ', ' ', $string);



will crash if $string contains many seperate matches of ' '
producing 





$string = preg_replace('/( )+/', '', $string);

$string = str_replace(' ', '', $string);



or



$string = preg_replace('/( )+/', '_', $string);

$string = str_replace(' ', '_', $string);



do all work fine.







This seems to be a bug in the underlying PCRE implementation, and not in
PHP itself.







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


Bug #51781 [Com]: array index 0 problem

2010-05-10 Thread feng_evan at yahoo dot com
Edit report at http://bugs.php.net/bug.php?id=51781&edit=1

 ID:   51781
 Comment by:   feng_evan at yahoo dot com
 Reported by:  feng_evan at yahoo dot com
 Summary:  array index 0 problem
 Status:   Bogus
 Type: Bug
 Package:  Arrays related
 Operating System: windows xp
 PHP Version:  5.2.13

 New Comment:

yes,i can see. "If you compare an integer with a string, the string is
converted to a number. If you compare two numerical strings, they are
compared as integers. These rules also apply to the switch statement. "



but,unacceptable intuitively


Previous Comments:

[2010-05-10 10:57:52] johan...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

numeric indexes are stored as integers, comparing integer 0 with a
string not starting with a digit gives true as the string is casted to
an integer.



Expected, documented, behavior. Won't change.


[2010-05-10 09:35:52] feng_evan at yahoo dot com

Description:

Array index value judgments must use absolute equal?

Test script:
---
$arr = array();

$arr['0'] = 'zero';

$arr['keyword'] = 'keyword';

foreach($arr as $key => $val) {

if ($key == 'keyword') {

//if ($key === 'keyword') { //ok

echo $val."\n";

}

}

//output:zero keyword







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


Bug #51781 [Bgs]: array index 0 problem

2010-05-10 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=51781&edit=1

 ID:   51781
 Updated by:   johan...@php.net
 Reported by:  feng_evan at yahoo dot com
 Summary:  array index 0 problem
 Status:   Bogus
 Type: Bug
 Package:  Arrays related
 Operating System: windows xp
 PHP Version:  5.2.13

 New Comment:

Well people expect that this will work:



$list = array('foo', 'bar', 'baz');

$value = $list[$_GET['id']];



And well, the behavior is like that >10 years even if it might be
considered bad breaking it is worse.


Previous Comments:

[2010-05-10 17:32:29] feng_evan at yahoo dot com

yes,i can see. "If you compare an integer with a string, the string is
converted to a number. If you compare two numerical strings, they are
compared as integers. These rules also apply to the switch statement. "



but,unacceptable intuitively


[2010-05-10 10:57:52] johan...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

numeric indexes are stored as integers, comparing integer 0 with a
string not starting with a digit gives true as the string is casted to
an integer.



Expected, documented, behavior. Won't change.


[2010-05-10 09:35:52] feng_evan at yahoo dot com

Description:

Array index value judgments must use absolute equal?

Test script:
---
$arr = array();

$arr['0'] = 'zero';

$arr['keyword'] = 'keyword';

foreach($arr as $key => $val) {

if ($key == 'keyword') {

//if ($key === 'keyword') { //ok

echo $val."\n";

}

}

//output:zero keyword







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


[PHP-BUG] Bug #51785 [NEW]: No way to escape quotes for XPath

2010-05-10 Thread pecoes at gmail dot com
From: 
Operating system: WinXP
PHP version:  5.3.2
Package:  *XML functions
Bug Type: Bug
Bug description:No way to escape quotes for XPath

Description:

There seems to be no way to escape single or double quotes for
XPath-Queries.



given: "



/test[text()="\""] produces an error message

/test[text()="\\""] dito

/test[text()="""] finds no match



This is not a PHP-Bug, I suppose. It may be a bug in the libxml2. It might
even be a bug in the XPath Spec itself. But regardless of where the blame
lies: This is serious! How is one supposed to use user-input in an XPath,
if it cannot be escaped?



I found a work-around, but it's fugly:



$dom = new DOMDocument;

$dom->loadXML('"');

$xpath = new DOMXPath($dom);



function xquote ($str)

{

if (strpos($str, '"') === FALSE) {

return '"'.$str.'"';

}

if (strpos($str, "'") === FALSE) {

return "'".$str."'";

}

$parts = preg_split('/(")/', $str, 0,
PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);

array_walk($parts,

function (&$val) {

if ($val == '"') $val = "'\"'";

else $val = '"'.$val.'"';

}

);

return 'concat('.implode(',', $parts).')';

}



$q = sprintf('/test[text()=%s]', xquote('"'));

if ($xpath->evaluate($q)->item(0)) {

echo 'found'; // works!

} else {

echo 'not found';

}

Test script:
---
$dom = new DOMDocument;

$dom->loadXML('"');

$xpath = new DOMXPath($dom);



$q = '/test[text()="""]';

if ($xpath->evaluate($q)->item(0)) {

echo "found\r\n";

} else {

echo "not found\r\n";

}



$q = '/test[text()="\\""]';

if ($xpath->evaluate($q)->item(0)) {

echo "found\r\n";

} else {

echo "not found\r\n";

}

Expected result:

found

found

Actual result:
--
not found

Warning: DOMXPath::evaluate(): Invalid predicate...

Warning: DOMXPath::evaluate(): Invalid expression...

Fatal error: Call to a member function item() on non-object...

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



[PHP-BUG] Req #51787 [NEW]: cloning objects

2010-05-10 Thread ele_hache at hotmail dot com
From: 
Operating system: WINDOWS
PHP version:  5.3.2
Package:  *General Issues
Bug Type: Feature/Change Request
Bug description:cloning objects

Description:

If I have an object that has references to different other objects and even
a few 

collections [arrays] of some even other objects; and I want to make a copy
of that 

instance ?? Must I clone the entire instance structure and performing a
clone on 

every other referenced object and the collections ?? If yes ... What a shit
!!!



The _clone call should be aware of the other referenced objects inside an
object, 

and do the clone as well. After all, why am I doing a clone, don't you
think ??


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



[PHP-BUG] Bug #51788 [NEW]: Segfault on get_defined_constants(TRUE)

2010-05-10 Thread whatrevolution at yahoo dot com
From: 
Operating system: Linux
PHP version:  5.3.2
Package:  Reproducible crash
Bug Type: Bug
Bug description:Segfault on get_defined_constants(TRUE)

Description:

get_defined_constants(TRUE) started throwing me segfaults today, for
apparently no reason.  Worked yesterday, doesn't work today.  Test script
does only that function and still throws back no data.  I can't rule out
server configuration, but I have tested for it somewhat, with same
results.



Apache mod_php5 produces the segfault.  PHP CLI does not.



bug 15614 Had this problem with print_r(get_defined_constants(TRUE)) in
2002.  My segfault is happening with get_defined_constants(TRUE) alone.



Ubuntu 10.04



Linux 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64




PHP 5.3.2-1ubuntu4 with Suhosin-Patch (built: Apr  9 2010 08:18:14) 



Zend Engine v2.3.0

with Xdebug v2.0.5

with Suhosin v0.9.29



Apache/2.2.14 (Ubuntu)



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



Bug #51782 [Bgs]: goto - regression

2010-05-10 Thread julian dot picht at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51782&edit=1

 ID:   51782
 User updated by:  julian dot picht at gmail dot com
 Reported by:  julian dot picht at gmail dot com
 Summary:  goto - regression
 Status:   Bogus
 Type: Bug
 Package:  *General Issues
 Operating System: all
-PHP Version:  5.3.2
+PHP Version:  5.3.0+

 New Comment:

Thanks for reporting that it is broken even longer than I thought.



But I do think that "There was enough time to raise concerns this won't

be changed." seems a bit like the bad habit of ignoring reality.



5.3 is not generally adopted and we just found out that we cannot move

our servers to 5.3 until this issue is fixed.



If you don't have the time to fix it, ask for a patch. Don't just

arrogantly deny that there may be a problem.



PLEASE listen to what the actual USERS of your - otherwise really

great - software need and report.


Previous Comments:

[2010-05-10 12:00:16] johan...@php.net

.


[2010-05-10 11:57:34] johan...@php.net

There is nothing broken as of 5.3.2, but 5.3.0, this addition was
discussed longtime ago. There was enough time to raise concerns this
won't be changed.


[2010-05-10 11:27:16] julian dot picht at gmail dot com

Description:

"goto" encourages bad coding style and breaks existing code. There needs
to be a 

php.ini-option to disable this "new feature".

Test script:
---
setGoto($action, $controller, $module, $params);



if ($this->getExit()) {

$this->redirectAndExit();

}

}

[...]

}

Expected result:

should work as before 5.3.2

Actual result:
--
500 Internal Server Error in [...] Parse error: syntax error, unexpected
T_GOTO, 

expecting T_STRING in /var/www/de.tv-stars/ZendFramework-

1.5.1/library/Zend/Controller/Action/Helper/Redirector.php on line 383 






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


Bug #51782 [Bgs]: goto - regression

2010-05-10 Thread rasmus
Edit report at http://bugs.php.net/bug.php?id=51782&edit=1

 ID:   51782
 Updated by:   ras...@php.net
 Reported by:  julian dot picht at gmail dot com
 Summary:  goto - regression
 Status:   Bogus
 Type: Bug
 Package:  *General Issues
 Operating System: all
 PHP Version:  5.3.0+

 New Comment:

So change your method name.  This will not change.


Previous Comments:

[2010-05-10 21:45:28] julian dot picht at gmail dot com

Thanks for reporting that it is broken even longer than I thought.



But I do think that "There was enough time to raise concerns this won't

be changed." seems a bit like the bad habit of ignoring reality.



5.3 is not generally adopted and we just found out that we cannot move

our servers to 5.3 until this issue is fixed.



If you don't have the time to fix it, ask for a patch. Don't just

arrogantly deny that there may be a problem.



PLEASE listen to what the actual USERS of your - otherwise really

great - software need and report.


[2010-05-10 12:00:16] johan...@php.net

.


[2010-05-10 11:57:34] johan...@php.net

There is nothing broken as of 5.3.2, but 5.3.0, this addition was
discussed longtime ago. There was enough time to raise concerns this
won't be changed.


[2010-05-10 11:27:16] julian dot picht at gmail dot com

Description:

"goto" encourages bad coding style and breaks existing code. There needs
to be a 

php.ini-option to disable this "new feature".

Test script:
---
setGoto($action, $controller, $module, $params);



if ($this->getExit()) {

$this->redirectAndExit();

}

}

[...]

}

Expected result:

should work as before 5.3.2

Actual result:
--
500 Internal Server Error in [...] Parse error: syntax error, unexpected
T_GOTO, 

expecting T_STRING in /var/www/de.tv-stars/ZendFramework-

1.5.1/library/Zend/Controller/Action/Helper/Redirector.php on line 383 






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


Bug #51788 [Opn->Bgs]: Segfault on get_defined_constants(TRUE)

2010-05-10 Thread johannes
Edit report at http://bugs.php.net/bug.php?id=51788&edit=1

 ID:   51788
 Updated by:   johan...@php.net
 Reported by:  whatrevolution at yahoo dot com
 Summary:  Segfault on get_defined_constants(TRUE)
-Status:   Open
+Status:   Bogus
 Type: Bug
 Package:  Reproducible crash
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Suhosin and xdebug change the engine in a way we can't support.


Previous Comments:

[2010-05-10 21:44:50] whatrevolution at yahoo dot com

Description:

get_defined_constants(TRUE) started throwing me segfaults today, for
apparently no reason.  Worked yesterday, doesn't work today.  Test
script does only that function and still throws back no data.  I can't
rule out server configuration, but I have tested for it somewhat, with
same results.



Apache mod_php5 produces the segfault.  PHP CLI does not.



bug 15614 Had this problem with print_r(get_defined_constants(TRUE)) in
2002.  My segfault is happening with get_defined_constants(TRUE) alone.



Ubuntu 10.04



Linux 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010
x86_64 



PHP 5.3.2-1ubuntu4 with Suhosin-Patch (built: Apr  9 2010 08:18:14) 



Zend Engine v2.3.0

with Xdebug v2.0.5

with Suhosin v0.9.29



Apache/2.2.14 (Ubuntu)



Test script:
---
http://bugs.php.net/bug.php?id=51788&edit=1


Bug #51788 [Com]: Segfault on get_defined_constants(TRUE)

2010-05-10 Thread whatrevolution at yahoo dot com
Edit report at http://bugs.php.net/bug.php?id=51788&edit=1

 ID:   51788
 Comment by:   whatrevolution at yahoo dot com
 Reported by:  whatrevolution at yahoo dot com
 Summary:  Segfault on get_defined_constants(TRUE)
 Status:   Bogus
 Type: Bug
 Package:  Reproducible crash
 Operating System: Linux
 PHP Version:  5.3.2

 New Comment:

Removing suhosin, xdebug, and recompiling apache, did in fact remove the
bug behavior.


Previous Comments:

[2010-05-10 21:51:32] johan...@php.net

Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Suhosin and xdebug change the engine in a way we can't support.


[2010-05-10 21:44:50] whatrevolution at yahoo dot com

Description:

get_defined_constants(TRUE) started throwing me segfaults today, for
apparently no reason.  Worked yesterday, doesn't work today.  Test
script does only that function and still throws back no data.  I can't
rule out server configuration, but I have tested for it somewhat, with
same results.



Apache mod_php5 produces the segfault.  PHP CLI does not.



bug 15614 Had this problem with print_r(get_defined_constants(TRUE)) in
2002.  My segfault is happening with get_defined_constants(TRUE) alone.



Ubuntu 10.04



Linux 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010
x86_64 



PHP 5.3.2-1ubuntu4 with Suhosin-Patch (built: Apr  9 2010 08:18:14) 



Zend Engine v2.3.0

with Xdebug v2.0.5

with Suhosin v0.9.29



Apache/2.2.14 (Ubuntu)



Test script:
---
http://bugs.php.net/bug.php?id=51788&edit=1


[PHP-BUG] Req #51789 [NEW]: Please add support for complexType mixed="true"

2010-05-10 Thread justin dot hendrickson at gmail dot com
From: 
Operating system: Ubuntu 10.04
PHP version:  5.3.2
Package:  SOAP related
Bug Type: Feature/Change Request
Bug description:Please add support for complexType mixed="true"

Description:

Currently, the following WSDL definition:





 

  

   One attribute of information belonging to a datasheet. The information
is in the element body.

  

 

 

  

   

The name of the information. Examples: Manufacturer Website Address,
Print Speed.

   

  

 





and XML of:

Heavy Duty Packaging Cutter



is mapped to PHP as:

object(stdClass)[12]

  public 'n' => string 'Product Name' (length=12)


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



Bug #45150 [Com]: MySQL functions cannot be used with 5.3.x on Vista when using "localhost"

2010-05-10 Thread kiewic at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=45150&edit=1

 ID:   45150
 Comment by:   kiewic at gmail dot com
 Reported by:  conor dot kerr_php at dev dot ceon dot net
 Summary:  MySQL functions cannot be used with 5.3.x on Vista
   when using "localhost"
 Status:   Bogus
 Type: Bug
 Package:  MySQL related
 Operating System: Windows Vista
 PHP Version:  5.3CVS-2008-07-23 (snap)

 New Comment:

Same problem with Windows Vista Ultimate SP2. Why isn't this a bug?


Previous Comments:

[2010-04-19 04:13:08] sasavilic at gmail dot com

I have same issue. Using Windows 7, 64-bit, IIS



When I try to connect to mysql server on 127.0.0.1 everything works
fine, but with localhost not.


[2010-04-10 03:58:16] buana95 at yahoo dot com

Same issue on Windows XP SP3 and PHP 5.3.1 with mysqlnd 5.0.5-dev -
081106 - $Revision: 289630 $. 



Work fine when using *libmysql.dll, but can not connect to database when
using *mysqlnd.dll (tested on mysql, mysqli, and PDO extension).



***



>From MySQL website: they have resolved the issue by looping to all
available IP (IPv4 - IPv6) and return the first successful connection.



So, it's must be from PHP streams that fail to resolve IPv6.



Never test on newer PHP version. Sorry.


[2010-04-05 07:52:30] telstra at dark-media dot net

Had the same problem on Windows Server 2008 R2 had to edit the hosts
file and un comment out the 127.0.0.1 localhost



Was stumbled for a while after upgrading from 5.2 to 5.3, this might not
be a bug with PHP but its something that is going to cause issues.


[2010-03-16 13:55:28] achurkin at gmail dot com

Same on Windows 7 Home Edition.

In PHP version 5.2.9 on same system everything works fine.


[2010-03-05 20:51:16] paj...@php.net

That's not a bug, please refer to the dozen other reports about that.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=45150


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