Whenever I try to add or update an existing record, Xataface takes me to an empty page.
The apache error_log file is showing the following error:
- Code: Select all
[Thu Jul 05 11:15:01 2012] [error] [client 10.12.12.73] PHP Fatal error: Call to undefined function hasWhiteSpace() in /var/www/html/contacts/tables/distribution_list/distribution_list.php on line 17, referer: http://file1.ykf.navtech.corp/contacts/index.php?-action=new&-table=distribution_list
This error seems to suggest that I am missing the hasWhiteSpace function. However this function is clearly defined in the ../tables/distribution_list/distribution_list.php function as shown in the code below.
What am I missing?
- Code: Select all
<?php
class tables_distribution_list {
function beforeSave(&$record)
{
$this_user = $_SESSION['UserName'];
$record->setValue('username',$this_user);
}
function hasWhiteSpace($string)
{
return (strpos($string, ' ') > 0);
}
function name__validate(&$record, $value, &$params){
$result = hasWhiteSpace($value); // This is line 17
if ( $result ){
$params['message'] = 'The distribution list must not contain spaces';
return false;
}
return true;
}
}
?>