PDA

View Full Version : Missing argument 2 for db_loadhash()


phalseid
26-05-05, 04:11 AM
myhost.com/dotproject/index.php?m=calendar&a=addedit&event_id=5

whenever I add an event i get:

Warning: Missing argument 2 for db_loadhash() in /home/betterby/public_html/dotproject/includes/db_connect.php on line 92

Warning: Cannot modify header information - headers already sent by (output start

this is a standart LAMP setup in ipowerweb, with temp table create access.

running in Firefox.

also, a useability issue if i check

"Show only on Working Days" it still shows on weekends?

any ideas? what are the variables it is trying to pass?

TheIdeaMan
22-06-05, 12:38 AM
I don't know the solution yet, but I do know it only happens when you pick a Project for that event (at least for my installation). I'm looking into a solution.

wharf65
22-06-05, 12:49 AM
I am also getting the same error message when I "tick" the checkbox for sending e-mail to attendees. However, the e-mail is sent and the respondees also acknowledge receiving the e-mail. Any assistance or insight in how I can remove this warning would be greatly appreciated!?

P.S.

System Configuration:

Fedora Core 3 - OS
Apache 2.0.52 - Web Server
MySQL 3.23.58 - DB
PHP 4.3.11 - PHP

[Error Message]
Warning: Missing argument 2 for db_loadhash() in /var/www/html/dotproject/includes/db_connect.php on line 92

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotproject/includes/db_connect.php:92) in /var/www/html/dotproject/classes/ui.class.php on line 515

TheIdeaMan
22-06-05, 12:54 AM
Hi all,

Found the solution. I'll be adding it to the Mantis system shortly.

For now, change line 701 from this:
<code>
$prj = db_loadHash($sql);
</code>

to this:
<code>
$prj_exists = db_loadHash($sql,$prj);
</code>

The db_loadHash() function returns true or false based on success. It assigns the result of the sql it was given to the an array that is passed in as the second parameter.

It was happily a minor change.

Enjoy.

TheIdeaMan
22-06-05, 12:59 AM
In Mantis: http://www.dotproject.net/mantis/bug_view_page.php?bug_id=0001050

wharf65
22-06-05, 10:53 PM
I apologize if I sound like a total newbie to the grep command, but line 701 is in what file?

Thanks in advance!

Hi all,

Found the solution. I'll be adding it to the Mantis system shortly.

For now, change line 701 from this:
<code>
$prj = db_loadHash($sql);
</code>

to this:
<code>
$prj_exists = db_loadHash($sql,$prj);
</code>

The db_loadHash() function returns true or false based on success. It assigns the result of the sql it was given to the an array that is passed in as the second parameter.

It was happily a minor change.

Enjoy.

pedroa
22-06-05, 11:07 PM
myhost.com/dotproject/index.php?m=calendar&a=addedit&event_id=5


File modules/calendar/addedit.php

Pedro A.

wharf65
25-06-05, 06:17 AM
Karma is heading out to pedroa and TheIdeaMan!!!

Had our "package launch" meeting today with faculty from our Engineering Division and they were very impressed with the features of this package. I hope to get the Inventory module working on our system and will provide "useful" feedback to this project whenever possible.

pedroa
26-06-05, 09:14 AM
This code is for the file modules/calendar/calendar.class.php, though.
This was allready resolved in:
http://www.dotproject.net/mantis/bug_view_advanced_page.php?bug_id=0000813

You better check the CVS.

Pedro A.