where2indexedArray failure [message #7367] |
Thu, 03 October 2019 13:12 |
edortizq
Messages: 82 Registered: August 2008 Location: Ecuador
|
Member |
|
|
My _cm_validateUpdate function has the following code:
function _cm_validateUpdate ($rowdata, $originaldata) {
if ($rowdata['secuencia'] > $rowdata['secuenciafinal']) {
$this->errors['secuencia'] = getLanguageText('e0123');
}
if ($rowdata['idorganizador'] != $originaldata['idorganizador'] ||
$rowdata['ruc3ultimos'] != $originaldata['ruc3ultimos'] ||
$rowdata['emisor'] != $originaldata['emisor']) {
$idorganizador = $rowdata['idorganizador'];
$ruc3ultimos = $rowdata['ruc3ultimos'];
$emisor = $rowdata['emisor'];
$select = "select count(*) from secuencia where idorganizador = '$idorganizador' and ruc3ultimos = '$ruc3ultimos' and emisor = '$emisor'";
$yaexiste = $this->getData($select);
if ($yaexiste > 0) {
$this->errors['idorganizador'] = getLanguageText('e0124');
}
}
$autorizacionsri = $rowdata['autorizacionsri'];
$ok = $this->validarAutorizacion($autorizacionsri);
if ($ok == 0) {
$this->errors['autorizacionsri'] = getLanguageText('e0128');
}
return($rowdata);
}
The $select variable value is "select count(*) from secuencia where idorganizador = '7' and ruc3ultimos = '1' and emisor = '1'"
Debbuging "$yaexiste = $this->getData($select);" sentence it goes to the where2indexedArray of include.library.inc file, the $where parameter of this funcion is my $select variable.
On line 7362 of include.library.inc the sentence "$output2 = where2indexedArray($found);" does a recursive call with the $found variable value as "*"; then it goes to the line 7347 with "trigger_error("Cannot extract token from: '$where'", E_USER_ERROR);" sentence.
Please let me know if I'm doing something wrong.
My radicore version is 1.91.0
[Updated on: Thu, 03 October 2019 13:13] Report message to a moderator
|
|
|
|