Loading...
 
Skip to main content

Tracker email field type: Fatal error on validating an email address

Status
Closed
Subject
Tracker email field type: Fatal error on validating an email address
Version
1.9.x
Category
  • Error
Feature
Trackers
Submitted by
chessy
Volunteered to solve
chessy
Rating
(0)
Description

If you create a tracker with an email field, and choose to validate that field by Tikiwiki, it will call TrackerLib->check_field_values(), that will include lib/trackers/trackerlib.php, that will include lib/registration/registrationlib.php, that will include lib/db/tikitable.php that will call check_script() function in an empty object ($access->check_script()) . Here is a trace log:


client 192.168.1.75 PHP Stack trace:, referer: http://newtiki/tiki-view_tracker.php?trackerId=1
client 192.168.1.75 PHP 1. {main}() /tmp/tikiwiki/tiki-view_tracker.php:0, referer: http://newtiki/tiki-view_tracker.php?trackerId=1
client 192.168.1.75 PHP 2. TrackerLib->check_field_values() /tmp/tikiwiki/tiki-view_tracker.php:473, referer: http://newtiki/tiki-view_tracker.php?trackerId=1
client 192.168.1.75 PHP 3. require_once() /tmp/tikiwiki/lib/trackers/trackerlib.php:1116, referer: http://newtiki/tiki-view_tracker.php?trackerId=1
client 192.168.1.75 PHP 4. require_once() /tmp/tikiwiki/lib/registration/registrationlib.php:21, referer: http://newtiki/tiki-view_tracker.php?trackerId=1
client 192.168.1.75 PHP Fatal error: Call to a member function check_script() on a non-object in /tmp/tikiwiki/lib/db/tikitable.php on line 10, referer: http://newtiki/tiki-view_tracker.php?trackerId=1

Solution

What is this tiki version?
There is no function check_script in the tiki code and no lib/db/tikitable.php
sylvie
---------

Access $access variable as a global variable in the check_field_values() function, before any include or require_once :

$ diff lib/trackers/trackerlib.php /tmp/trackerlib.php
1114c1114
< global $registrationlib,$dbTiki, $sender_email;


> global $registrationlib,$dbTiki, $sender_email, $access;

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
871
Created
Sunday 03 September, 2006 22:16:18 UTC
by Unknown
LastModif
Thursday 05 July, 2007 13:16:56 UTC


Show PHP error messages