I am getting this message when trying to add a new kb article "Warning: extract(): First argument should be an array in /var/www/OpenIT-1.0.2/edit.php on line 214"
OK I'll change line 5 in kb.php, I couldn't seem to find the 'source' where that -1 value was being generated... However that's not suprising as I've only got a beginning php book and no real php experience.
Thanks...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting this message when trying to add a new kb article "Warning: extract(): First argument should be an array in /var/www/OpenIT-1.0.2/edit.php on line 214"
The request string is http://helpdesk/edit.php?KB=-1
I don't know if I have fixed it properly but to get around this I have changed slightly the linkbutton function in inc/button.php
--- buttons.php 2004-08-18 17:20:19.000000000 +1000
+++ buttons.php.fix.james 2004-08-18 17:20:11.000000000 +1000
@@ -8,6 +8,11 @@
*/
if($id == null)
return'<img src="images/button_x.png" alt="N/A '.$action.'" />';
+
+ elseif($id == -1)
+ return '<a href="'.$action.'.php?'.$type.'='.'New'.'" title="'.$action.'">'.
+ '<img src="images/button_'.$action.'.png" alt="'.$action.'" />'
+ .$text.'</a>';
else
return '<a href="'.$action.'.php?'.$type.'='.$id.'" title="'.$action.'">'.
'<img src="images/button_'.$action.'.png" alt="'.$action.'" />'
What an embarrassing bug! Sorry I didn't catch that, but thanks for the great fix James.
I'll try to get a bug fix release out soon which fixes this issue (and hopefully some others).
Your patch will definately do the trick James, but an easier fix would be to change view/kb.php line 5 to say 'New' (with quotes) instead of -1.
OK I'll change line 5 in kb.php, I couldn't seem to find the 'source' where that -1 value was being generated... However that's not suprising as I've only got a beginning php book and no real php experience.
Thanks...