PDA

View Full Version : Small "patch" for ae_desc.php


pasha
09-03-06, 12:29 PM
Hi all,

You will only get an error when editing a task on a server running php 5+, the error will be something along the lines of:
Fatal error: Only variables can be passed by reference in /dotnet/modules/tasks/ae_desc.php on line 39

Here's a quick change to fix that, and your taks will work well again.

take this line (39) in ae_desc.php [/modules/tasks/]
<?php echo arraySelect(dPgetSysVal("TaskType"), "task_type", "class='text'", $obj->task_type, false); ?>

and change to this:

<?php
$dPgetSysVal_php5 = dPgetSysVal("TaskType");
echo arraySelect($dPgetSysVal_php5, "task_type", "class='text'", $obj->task_type, false);
?>

Hope that helps someone out there,

Paul

cyberhorse
11-03-06, 03:39 PM
shouldn't be an issue in latest cvs (cause of templates)
applied to stable_2

pasha
12-03-06, 04:20 PM
Yeah I figured this would be fixed probably quite quick, I just thought I'd post it as it was the only thing I've noticed was giving me errors on the latest stable release I had installed .. (I've only been running dotnet for like 4 days) ... the error isn't caused by templates.. (at least not as far as I know) I did look at it very briefly ofcourse.. it's just the way PHP5 handles references.. it thinks $var = funcName($arg, $arg2); is a reference (to the function) instead of evaluating it...

Good to hear it was fixed though... for those poor souls that don't know php :)

Peace,

Paul