InDefero

Sign in or create your account | Project List | Help

Issue 46: PHP 5.2.0 compatibility

Reported by Thomas Chemineau, Oct 3, 2008

When I reply to a new ticket, with changing status, I got a Pluf
exception :

8 : Indirect modification of overloaded property
IDF_IssueComment::$changes has no effect

PlufErrorHandler 
[/tmp/Pluf_Template-19fbdd36345b9016b9711b20d862e3f3.phps, line 32]
:

8<------
 30 <?php if (strlen($t->_vars['c']->content) > 0): 
Pluf_Template_safeEcho(Pluf_Template_unsafe($t->_vars['c']->content))
;  else:  echo(__('(No comments were given for this chang    e.)'));
endif;  if ($t->_vars['c']->changedIssue()): ?>
 31 
 32 <?php foreach ($t->_vars['c']->changes as $t->_vars['w'] =>
$t->_vars['v']): ?>
 33 
 34  <?php if ($t->_vars['w'] == 'su'):  echo(__('Summary:')); endif;
 if ($t->_vars['w'] == 'st'):  echo(__('Status:')); endif;  if
($t->_vars['w'] == 'ow'):  echo(__('Owner:'));     endif;  if
($t->_vars['w'] == 'lb'):  echo(__('Labels:')); endif; ?> <?php if
($t->_vars['w'] == 'lb'):  $t->_vars['l'] = implode(', ',
$t->_vars['v']);  Pluf_Template_safeEc    ho($t->_vars['l']);  else: 
Pluf_Template_safeEcho($t->_vars['v']);  endif;  endforeach;  endif;
?>
8<------

Tell me if you need more information.

Comment 1 by Loïc d'Anterroches, Oct 6, 2008

Can you remind me your PHP version?

Comment 2 by Thomas Chemineau, Oct 7, 2008

There was an update on PHP this week, on Debian Etch.
But this is a minor version update (some corrective measures I
think).

PHP 5.2.0-8+etch13

Comment 3 by Loïc d'Anterroches, Oct 8, 2008

Thanks, I will try to secure some time and fix that this week.
Status: Accepted

Comment 4 by Loïc d'Anterroches, Nov 5, 2008

Ok, I found the problem. Tell me, when is coming out the next version
of Debian? The problem I have here, is that in some cases, PHP 5.2.0
is not handling correctly the foreach loop and array. This is due to
bugs introduced when they added the new "Iterator" interface to allow
the creation of a class playing well with "foreach".

Do you have the opportunity to upgrade to a better version of PHP 5?
If not, I will need to figure out a workaround, but it may be hugly.

Comment 5 by Thomas Chemineau, Nov 6, 2008

Interesting :) The next version of Debian is normaly planned for the
end of this year... But it seems that there are still many bugs, I
hope that Debian 5 will come for spring 2009.

http://blog.schmehl.info/Debian/releasing-lenny-6

I should upgrade my server to lenny in a few day. This will probably
resolve problems occuring with this ugly PHP version.

Comment 6 by Loïc d'Anterroches, Nov 7, 2008

Ok, marked the issue as a PHP 5.2.0 compatibility issue with low
priority (nothing against you, just against this version of PHP).
Really annoying to understand the bug fully but not being able to
figure out a correct workaround.

Merci pour ta patience !
Labels: Priority:Low, PHP:5.2.0, -Priority:Medium

Comment 7 by Loïc d'Anterroches, Nov 26, 2008

I am closing this bug and will inform that InDefero does not support
PHP 5.2.0 but requires 5.2.4 as minimal version.

This is because I know I will never have the time to fix that, so
this bug will just stay there until nobody is using PHP 5.2.0.

Of course, I have nothing against somebody proposing a fix for this
version of PHP.

Désolé...
Status: WontFix

Comment 8 by Nicolas Lassalle, Nov 30, 2008

I have this exception on the timeline page.
I can fix it by creating a tmp variable to foreach.

I change:
foreach ($this->changes as $w => $v) {

into:
$changes = $this->changes;
foreach ($changes as $w => $v) {

Hope it could help

Comment 9 by Loïc d'Anterroches, Nov 30, 2008

See src/IDF/WikiRevision.php line 170.

Comment 10 by Loïc d'Anterroches, Dec 1, 2008

Reopened and changed the title to express what it is about, still
with a low priority.
Status: Accepted
Summary: PHP 5.2.0 compatibility

Comment 11 by Loïc d'Anterroches, Dec 1, 2008

Fixed in commit 67361d7.
Status: Fixed
Owner: loic

Created: 3 months 4 days ago by Thomas Chemineau

Updated: 1 month 6 days ago

Status: Fixed

Owner: Loïc d'Anterroches

Labels:
Type:Defect
Priority:Low
PHP:5.2.0