Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003633TestLinkGeneralpublic2010-07-27 18:112010-08-31 20:27
ReporterTheisner 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSDebian LinuxOS Version
Product Version1.8.5 (bug fixing) 
Fixed in Version1.9 Beta 5 
Summary0003633: Searching for non existing test case id in the main menu leads to error "Fatal error: Call to undefined function reportFatal()"
DescriptionHi,

when searching for a non existing test case ID the following error is shows in the browser window:

Fatal error: Call to undefined function reportFatal() in /var/www/testlink/lib/functions/database.class.php on line 193

This probelm is reproducible.

Browser Firefox 3.6
Server: Debian Linux,
Steps To ReproduceSearch for a non existing test case ID prefix.

IN my system there ist prefix MOVI.

Searching for MOVI- delivers defined search result (Your search delivered no results!).

When searching for a non existing prefix (e.g. MOV-) the error is shown.

TagsNo tags attached.
Database (MySQL,Postgres,etc)
BrowserFirefox 3.6.8
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filesgif file icon ScreenHunter_ Jul. 2721 18.12.gif [^] (11,552 bytes) 2010-07-27 18:11


gif file icon ScreenHunter_ Jul. 2722 20.11.gif [^] (8,991 bytes) 2010-07-27 18:11


txt file icon replace-code-fix-3633.txt [^] (1,516 bytes) 2010-08-14 14:59 [Show Content]

- Relationships
related to 0003305closedfman Data migration from 1.7.5 to 1.8.5 fails with error reported in apace log 
related to 0003677closedfman Search bar 'Test Case ID' allows SQL injection 

-  Notes
(0010759)
Theisner (reporter)
2010-07-27 18:40

Hi again. When I try the same on testlink 1.8.3
http://testlink.sourceforge.net/demo/index.php [^]


I get these messages. Guess they are of more help:

ERROR ON exec_query() - database.class.php
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - SELECT DISTINCT NH.parent_id AS tcase_id FROM tcversions TCV, nodes_hierarchy NH WHERE TCV.id = NH.id AND TCV.tc_external_id=

THE MESSAGE :: SQL [11] executed [took 0.2942 secs][all took 4.1826 secs]: SELECT DISTINCT NH.parent_id AS tcase_id FROM tcversions TCV, nodes_hierarchy NH WHERE TCV.id = NH.id AND TCV.tc_external_id= Query failed: errorcode[1064] errormsg:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
(0010786)
fman (administrator)
2010-08-04 13:50

1. reportFatal() error has been reported (and fixed) long time ago, you can fix it adding $this-> to reportFatal() call inside database.class.php

2. regarding info you have added on note problem is a missing check on return of function that get external id, because it result is used here
AND TCV.tc_external_id= , and as you can see there is a blank/empty string.

I think this has been solved on 1.9 Beta
(0010787)
fman (administrator)
2010-08-04 13:54

Please use attached code in related issue to solve at least the 'missing function' error

thanks
(0010797)
Theisner (reporter)
2010-08-04 15:09

Hi,

missig function error has been resolved. Is there also an easy way to get rid of the sql error?

Thanks for all your help!

Rgds Thomas
(0010798)
fman (administrator)
2010-08-04 15:14

I will try to fix it in the next weeks.
(0010853)
ReinKrul (reporter)
2010-08-13 09:34

Hi,

Regarding: '1. reportFatal() error has been reported (and fixed) long time ago, you can fix it adding $this-> to reportFatal() call inside database.class.php'

I'm running the 1.8.5b release and I'm still getting the error message that reportFatal() is undefined. Of course I can fix it myself, but is there going to be a release with this fix?
(0010861)
fman (administrator)
2010-08-13 18:22

no new released will be done for 1.8.x
a fix for this issue has been available on related issue 3305
(0010864)
fman (administrator)
2010-08-14 14:57

Edit your testcase.class.php file, replacing code for method getInternalID()

with attached code.
Please test and give us feedback
(0010865)
Theisner (reporter)
2010-08-14 19:48

Hi fman,

code works like a charm!
Thank you very much! Your help is much apprechiated!

Thomas
(0010866)
fman (administrator)
2010-08-15 10:22

And code attached to fix in 1.8.5b ( not commited to 1.8.x branch)
(0011071)
fman (administrator)
2010-08-31 20:27

Release BETA 6 - 20100831

- Issue History
Date Modified Username Field Change
2010-07-27 18:11 Theisner New Issue
2010-07-27 18:11 Theisner File Added: ScreenHunter_ Jul. 2721 18.12.gif
2010-07-27 18:11 Theisner File Added: ScreenHunter_ Jul. 2722 20.11.gif
2010-07-27 18:40 Theisner Note Added: 0010759
2010-08-04 13:50 fman Note Added: 0010786
2010-08-04 13:54 fman Relationship added related to 0003305
2010-08-04 13:54 fman Note Added: 0010787
2010-08-04 15:09 Theisner Note Added: 0010797
2010-08-04 15:14 fman Note Added: 0010798
2010-08-04 15:15 fman Assigned To => fman
2010-08-04 15:15 fman Status new => assigned
2010-08-13 09:34 ReinKrul Note Added: 0010853
2010-08-13 18:22 fman Note Added: 0010861
2010-08-14 14:57 fman Note Added: 0010864
2010-08-14 14:59 fman File Added: replace-code-fix-3633.txt
2010-08-14 14:59 fman Status assigned => feedback
2010-08-14 19:48 Theisner Note Added: 0010865
2010-08-14 19:48 Theisner Status feedback => assigned
2010-08-15 10:22 fman Note Added: 0010866
2010-08-15 10:22 fman Status assigned => resolved
2010-08-15 10:22 fman Fixed in Version => 1.9 Beta 5
2010-08-15 10:22 fman Resolution open => fixed
2010-08-15 14:39 fman Relationship added related to 0003677
2010-08-31 20:27 fman Note Added: 0011071
2010-08-31 20:27 fman Status resolved => closed



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker