mohamedsaeed27 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

PHP Notice: Uninitialized string offset #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,
I try v54, the error is :
--------------------------------------------------
1222233357 [INFO]: Connecting to tcp://talk.google.com:5222
PHP Notice:  Uninitialized string offset:  0 in
xmpphpr54\xmpphp\XMLStream.php on line 379
PHP Notice:  Uninitialized string offset:  0 in
xmpphpr54\xmpphp\XMLStream.php on line 379
PHP Notice:  Uninitialized string offset:  0 in
xmpphpr54\xmpphp\XMLStream.php on line 379
1222233359 [INFO]: Starting TLS encryption
PHP Notice:  Uninitialized string offset:  0 in
xmpphpr54\xmpphp\XMLStream.php on line 379
PHP Fatal error:  Cannot unset string offsets in
xmpphpr54\xmpphp\XMLStream.php on line 388
--------------------------------------------------
and it quits. before I use v50 and no problem.
Please help
Frans

Original issue reported on code.google.com by fransg....@gmail.com on 24 Sep 2008 at 5:23

GoogleCodeExporter commented 8 years ago
So when I was getting this error, I edited XMLStream to check for keys before
unsetting things.  When I do this, I end up getting the error message "Auth 
failed!"

Not that this solves your problem, but at least it gives an idea of where the
breakdown could be?

Original comment by sean.bus...@gmail.com on 8 Oct 2008 at 9:14

GoogleCodeExporter commented 8 years ago
line: 379
//while(!$this->disconnected and $this->until_count[$event_key] < 1 and (time() 
-
$start < $timeout or $timeout == -1)) {
/* @hotfix 20081124 ugly notices <guenter@grodotzki.ph> */
while(!$this->disconnected && (!isset($this->until_count[$event_key]) ||
$this->until_count[$event_key] < 1) && (time() - $start < $timeout || $timeout 
== -1)) {
    $this->__process();
}

line 53x:
foreach($this->until as $key => $until) {
if(is_array($until)) {
    if(in_array($name, $until)) {
        $this->until_payload[$key][] = array($name, $payload);

        /* @hotfix 20081124 remove ugly notices <guenter@grodotzki.ph> */
        if(!isset($this->until_count[$key]))
        {
            $this->until_count[$key] = 0;
        }
        $this->until_count[$key] += 1;
        #$this->until[$key] = false;
    }
}
}

Original comment by azn.guw...@googlemail.com on 24 Nov 2008 at 5:12

GoogleCodeExporter commented 8 years ago
Fixed in SVN

Original comment by nathanfr...@gmail.com on 26 Nov 2008 at 10:56