View Issue Details

IDProjectCategoryView StatusLast Update
0001612XdebugUncategorizedpublic2019-01-17 11:56
Reportertheis Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version2.7.0beta1 
Summary0001612: Wrong default parameter when using xdebug
Description

I'm using Debian Buster with PHP 7.3 and xdebug from the distribution.

I noticed the bug in the following code (Stram.php from zend-dactiros):

public function rewind()
{
    return $this->seek(0);
}
public function seek($offset, $whence = SEEK_SET)
{
   ...
   fseek($r, $offset, $whence)
   ...
}

$whence is a default parameter and should be SEEK_SET when not explicitly passed. But sometimes $whence becomes null instead of 0 and fseek fails. With sometimes I mean the first call(s) are OK, but then the error happens.
When I change $this->seek(0) to $this->seek(0, SEEK_SET) there is no error, but other code parts may fail.

This happens even if I'm only enabling xdebug but not debugging at all.

My xdebug.ini is pretty straightforward:
zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9100
xdebug.remote_handler=dbgp

TagsNo tags attached.
Operating System
PHP Version7.3.0

Relationships

duplicate of 0001583 closedderick Xdebug crashes when OPcache's compact literals optimisation is on 

Activities

derick

2019-01-17 11:51

administrator   ~0004813

This is very likely the same problem as 0001583, which has a workaround: https://bugs.xdebug.org/view.php?id=1583#c4774

theis

2019-01-17 11:51

reporter   ~0004814

Maybe this is related to 0001607: As the result I see similar error messages. I haven't tried to disable opcode yet.

theis

2019-01-17 11:56

reporter   ~0004815

Yes, that worked!

Issue History

Date Modified Username Field Change
2019-01-17 11:49 theis New Issue
2019-01-17 11:51 derick Note Added: 0004813
2019-01-17 11:51 derick Relationship added duplicate of 0001583
2019-01-17 11:51 derick Status new => resolved
2019-01-17 11:51 derick Resolution open => duplicate
2019-01-17 11:51 derick Assigned To => derick
2019-01-17 11:51 theis Note Added: 0004814
2019-01-17 11:56 theis Note Added: 0004815
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized