Loading...
 
Skip to main content

PHP Fatal error when editing a page containing a tracker with User auto-assign

Status
Open
Subject
PHP Fatal error when editing a page containing a tracker with User auto-assign
Version
15.x
Category
  • Error
Feature
Trackers
Resolution status
New
Submitted by
hjohanns
Lastmod by
hjohanns
Rating
(0)
Description

Hello all, let me describe a strange error I have, and the various elements I have found. I am missing the link between those elements, so hope someone can illuminate me to work on a fix.

Symptom:
Editing a page cause an error
Fatal error: [] operator not supported for strings in <basedir>/lib/wiki-plugins/wikiplugin_tracker.php on line 843

Context:
The page contains a Tracker plugin:

<p>\{TRACKER( trackerId="2" fields="102:100:101:99:103:104:105" view="page")\}Thanks for your suggestion!\{TRACKER\}</p>


The tracker in question contains a field User Selector, with parameter Auto-Assign set to "Creator".

Analysis steps:
The Auto-Assign is functional to the problem, because if I put Auto-Assign to "None" it does not reproduce.
The line that fails is
foreach ($hidden_fieldId as $k => $v) {
if | in_array($v, $outf {
unset($hidden_fieldId$k);
} else {
$outf[] = $v; <<== Line 843 that fails
}
}
Indicating that a string value is pushed into $outf whereas it should be numeric.
In fact, code above in the same file shows that if a User is on Auto-Assign, the field is inserted as $hidden_fieldId.
The most puzzling thing to me is that problem occurs when editing the page. What special action is perform to edit that page definition, and why does it trigger the code, also if I manage to get the content that it tries to write in $outf[], then I might see the light.
Thanks for any suggestion, and for the fantastic community.
Hubert

Workaround
Take the Auto-Assign off on the tracker field.
Importance
3
Priority
15
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6231
Created
Friday 06 January, 2017 18:05:06 UTC
by hjohanns
LastModif
Friday 06 January, 2017 18:13:16 UTC


Show PHP error messages