Improve error output for debugging
This commit is contained in:
parent
ce5fa7dc05
commit
f3b3bf296f
|
@ -496,7 +496,7 @@ class tx_dlf_document {
|
|||
|
||||
if (!$mPid) {
|
||||
|
||||
trigger_error('No PID for metadata definitions found', E_USER_WARNING);
|
||||
trigger_error('Invalid PID ('.$mPid.') for metadata definitions', E_USER_WARNING);
|
||||
|
||||
return array ();
|
||||
|
||||
|
@ -849,7 +849,7 @@ class tx_dlf_document {
|
|||
|
||||
} elseif (!$pid) {
|
||||
|
||||
trigger_error('No PID given to save document', E_USER_WARNING);
|
||||
trigger_error('Invalid PID ('.$pid.') given to save document', E_USER_WARNING);
|
||||
|
||||
return FALSE;
|
||||
|
||||
|
@ -874,6 +874,9 @@ class tx_dlf_document {
|
|||
|
||||
}
|
||||
|
||||
// Set PID for metadata definitions.
|
||||
$this->mPid = $pid;
|
||||
|
||||
// Get metadata array.
|
||||
$metadata = $this->getTitledata($pid);
|
||||
|
||||
|
@ -902,6 +905,12 @@ class tx_dlf_document {
|
|||
|
||||
list ($structure) = $GLOBALS['TYPO3_DB']->sql_fetch_row($result);
|
||||
|
||||
} else {
|
||||
|
||||
trigger_error('Could not identify structure type', E_USER_ERROR);
|
||||
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
|
||||
// Get UIDs for collections.
|
||||
|
@ -1617,7 +1626,7 @@ class tx_dlf_document {
|
|||
|
||||
// Get document PID and location from database.
|
||||
$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
|
||||
'tx_dlf_documents.uid,tx_dlf_documents.pid,tx_dlf_documents.partof,tx_dlf_documents.location',
|
||||
'tx_dlf_documents.uid AS uid,tx_dlf_documents.pid AS pid,tx_dlf_documents.partof AS partof,tx_dlf_documents.location AS location',
|
||||
'tx_dlf_documents',
|
||||
$whereClause,
|
||||
'',
|
||||
|
|
|
@ -246,7 +246,7 @@ class tx_dlf_helper {
|
|||
|
||||
if (!$uid || !$pid || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) {
|
||||
|
||||
trigger_error('At least one argument is not valid', E_USER_WARNING);
|
||||
trigger_error('At least one argument is not valid: UID='.$uid.' PID='.$pid.' TABLE='.$table, E_USER_WARNING);
|
||||
|
||||
return '';
|
||||
|
||||
|
@ -269,7 +269,7 @@ class tx_dlf_helper {
|
|||
|
||||
}
|
||||
|
||||
trigger_error('No "index_name" with UID '.$uid.' found for PID '.$pid.' in table '.$table, E_USER_WARNING);
|
||||
trigger_error('No "index_name" with UID '.$uid.' found for PID '.$pid.' in TABLE '.$table, E_USER_WARNING);
|
||||
|
||||
return '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue