close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": libapr-1.so.0: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#64 closed defect (fixed)

Strict Standards on key/current functions

Reported by: rtshome Owned by: moo
Priority: major Milestone: 1.2.1
Component: cacher Version: 1.2-dev
Keywords: Cc:
Application: PHP Version:
Other Exts: SAPI:
Probability: Blocked By:
Blocking:

Description (last modified by moo)

I have a problem with XCache.
In our test machine we enabled xcache this morning. With all debug
levels on (STRICT STANDARDS included), we have some functions that raise
a Strict Standards warning that they did not raise without xcache.

Here it is a sample code:

<?php
function returnArray() {
    return array("key" => "value");
}

function passMe($p) {
    echo $p;
}

passMe(current(returnArray()));

?>

In PHP 5.2 this is valid code (it doesn't raise any php warning).
With PHP 5.2 and XCache enabled it raises a warning on the passMe
function call:

Strict Standards: Only variables should be passed by reference in
xcache.php on line 10

Apart modifying the code, is there another solution? Is it a xcache bug?

Thank you,
Rts

Change History (11)

comment:1 Changed 8 years ago by judas_iscariote

  • Milestone set to 1.2.1
  • Owner changed from moo to judas_iscariote
  • Status changed from new to assigned

yes it is, reproduced here, thanks for the short test case, Im sure moo can look into this with such small reproduce test.

comment:2 Changed 8 years ago by judas_iscariote

  • Owner changed from judas_iscariote to moo
  • Status changed from assigned to new

comment:3 Changed 8 years ago by judas_iscariote

this is triggered on the first load, and only when xcache is enabled.

comment:4 Changed 8 years ago by moo

reproduced, i forgot to that E_ALL does not include E_STRICT

comment:5 Changed 8 years ago by judas_iscariote

E_STRICT is included on E_ALL only in PHP6 ;)

comment:6 Changed 8 years ago by moo

  • Status changed from new to assigned

comment:7 Changed 8 years ago by moo

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in [344]

comment:8 Changed 8 years ago by moo

  • Description modified (diff)

comment:9 Changed 8 years ago by moo

  • Resolution fixed deleted
  • Status changed from closed to reopened

this was not fixed correctly

comment:10 Changed 8 years ago by moo

  • Resolution set to fixed
  • Status changed from reopened to closed

fixed in [345] [346]

comment:11 Changed 8 years ago by moo

this is a same bug as #59

Note: See TracTickets for help on using tickets.