#30394 [Com]: Assignment operators yield wrong result with __get/__set

2004-10-15 Thread ante dot dfg at moj dot net
 ID:   30394
 Comment by:   ante dot dfg at moj dot net
 Reported By:  php at hartwerk dot com
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
 PHP Version:  5.0.2
 New Comment:

This code works if you return the value from _get via reference
try:

public function &__get( $what ) {
return $this->_p[ $what ];
}


Previous Comments:


[2004-10-11 11:24:19] php at hartwerk dot com

Description:

When there is a function on the right-hand side of an assignment
operator expression, and the variable is to be accessed via
__get/__set, the operation yields wrong results. 

Reproduce code:
---
class Container
{
public function __get( $what )
{
return $this->_p[ $what ];
}

public function __set( $what, $value )
{
$this->_p[ $what ] = $value;
}

private $_p = array();
}

$c = new Container();
$c->a = 1;
$c->a += 1;
print $c->a;// --> 2

print " - ";
$c->a += max( 0, 1 );
print $c->a;// --> 4 (!)

Expected result:

2 - 3

Actual result:
--
2 - 4





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


#30165 [Com]: SOAP FAULT upgrading from PEAR::SOAP to php5

2004-09-21 Thread ante dot dfg at moj dot net
 ID:   30165
 Comment by:   ante dot dfg at moj dot net
 Reported By:  s dot tabacchiera at gruppocsf dot com
 Status:   Open
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.0.1
 New Comment:

YesI have the same problem...nothing related to SOAP works in php
5.0.1..I tried some examples from zend.com(for php5) and all the time
php 5.0.1 crasches with the Uncaught SoapFault exception..Im on WinXP
sp1, Apache 1.3.31, php 5.0.1


Previous Comments:


[2004-09-20 12:51:55] s dot tabacchiera at gruppocsf dot com

Description:

Hi all, my server is running php4 and PEAR::SOAP 0.8RC2, whilst client
is running php5.

This code generates an error:
-
http://blablabla.com/soap_server.php?wsdl";;
$client1 = new SoapClient($wsdl1);
var_dump($client1->__getFunctions());
?>


The error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL:PHP-SOAP doesn't support transport
'http://schemas.xmlsoap.org/soap/http/' in/root/soap.php:3
Stack trace:
#0 {main} thrown in /root/soap.php on line 3

Any clue?







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


#30133 [Com]: get_current_user crashes php-cgi.exe

2004-09-17 Thread ante dot dfg at moj dot net
 ID:   30133
 Comment by:   ante dot dfg at moj dot net
 Reported By:  slb at oilily dot nl
 Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 2000 SP 4
 PHP Version:  5.0.1
 New Comment:

I can confirm this on Win XP sp1 Apache 1.3.31 with php 5.0.1 as
ISAPI

apache crashes.with errror in php5ts.dll


Previous Comments:


[2004-09-17 13:26:07] slb at oilily dot nl

Description:

When using get_current_user() the php-cgi.exe crashes with message:

The instruction at "0x100073dd" referenced memory at "0x". The
memory could not be "written".

Reproduce code:
---


Expected result:

Get current username

Actual result:
--
The instruction at "0x100073dd" referenced memory at "0x". The
memory could not be "written".





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


#30046 [Com]: Apache crashes when $_COOKIE[] is accessed

2004-09-09 Thread ante dot dfg at moj dot net
 ID:   30046
 Comment by:   ante dot dfg at moj dot net
 Reported By:  verbert_p at hotmail dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Win XP SP2
 PHP Version:  5.0.1
 New Comment:

I can also confirm this bug on Win XP under Apache 1.3.31 using release
version of php 5.0.1...

Reproduce code
[PHP]
if(isset($_COOKIE[]))
print ("Coookie");
[/PHP]

After runing the script Apache 1.3.31 craches...


Previous Comments:


[2004-09-10 04:19:04] verbert_p at hotmail dot com

Description:

When I address $_COOKIE[] instead of $_COOKIE['name'], apache (2.0.50
win32) crashes. this problem does not exist on apache 2.0.48 / php
4.3.4

Reproduce code:
---
if (isset ($_COOKIE[])) { ... }

Expected result:

false / true

Actual result:
--
apache crash





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


#29986 [Com]: Class constants won't work with predefined constants when using ReflectionClass

2004-09-08 Thread ante dot dfg at moj dot net
 ID:   29986
 Comment by:   ante dot dfg at moj dot net
 Reported By:  mitchel at sahertian dot com
 Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Linux 2.6.8.1 x86
 PHP Version:  5.0.1
 New Comment:

Interestingly enough this example(btw there's an error at end of DEFINE
- define("FOOBAR",0x0008): <- this should be ;) when copy paste and run
dies with Fatal error: Trying to clone an uncloneable object of class
ReflectionClass in c:\serverroot\test.php on line 11

but If I put a reference in $o=new ReflectionClass("MyClass");
making it $o=&new ReflectionClass("MyClass");

then I actualy get the message ("actual result") that Michael
stated

I'm using php 5.0.1 (release version) on XP Pro under Apache
1.3.31

Hope this helps somehow...


Previous Comments:


[2004-09-05 15:40:22] mitchel at sahertian dot com

Description:

I have a variable classname i have to get a constant/static property
from.
${$classname}::stuff
doesn't work, so i have to use the reflection api.
This works for strings and numbers, but when i try to use getConstant()
upon a constant that is defined as another constant, it returns
UNKNOWN:0.

This happens for user defined constants as well as things like `true'.

Reproduce code:
---
getConstant("foo"));
var_dump($o->getConstant("bar"));
var_dump($o->getConstant("works"));
?>

Expected result:

bool(true)
int(8)
string(11) "yes it does"

Actual result:
--
UNKNOWN:0
UNKNOWN:0
string(11) "yes it does"





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