Forum

[SOLVED] V9.1.2 Err...
 
Notifications
Retirer tout

[SOLVED] V9.1.2 Error when adding BillLine

2 Posts
2 Utilisateurs
0 Reactions
1,900 Vu
Louis Heredero
(@baryhobal)
Posts: 49
Trusted Member
Début du sujet
 
[#7602]

Hello,

I found an error which happens when adding a new bill line in v9.1.2. I don't know if it has been fixed yet.In tool/saveBillLine.php, on line 167, 174 and 181, strpos checks if $catalogSpecification is in $bill/$quot/$order->comment. However, sometimes $catalogSpecification is an empty string and this throws the following error:

** ERROR ** [V9.1.2] ERROR **
** ERROR ** [V9.1.2] on file '/var/www/html/projeqtor/tool/saveBillLine.php' at line (174)
** ERROR ***** [V9.1.2] cause = strpos(): Empty needle

A fix could be to first check if $catalogSpecification is empty.
For example, lines 136 to 142 could be changed from

$catalogSpecification = "";
$boolCatalog = false;
if (array_key_exists('billLineIdCatalog',$_REQUEST) and $_REQUEST['billLineIdCatalog']) {
  $boolCatalog = true;
  $catalog=new Catalog($_REQUEST['billLineIdCatalog']);
  $catalogSpecification = ($catalog->specification)?$catalog->specification:"";
}

to

$catalogSpecification = "";
$boolCatalog = false;
if (array_key_exists('billLineIdCatalog',$_REQUEST) and $_REQUEST['billLineIdCatalog']) {
  $catalog=new Catalog($_REQUEST['billLineIdCatalog']);
  if ($catalog->specification) {
    $boolCatalog = true;
    $catalogSpecification = $catalog->specification;
  }
}

 
Posté : 29/06/2021 7:44 pm
(@babynus)
Posts: 14952
Membre Admin
 

This is already fixed in V9.1.5
Please always migrate to last patch level when you are on a version.

Patch is last number, the x in A.B.x
A is major version, B is evolutive version, x is patch
Patches only include bug fixing.


 
Posté : 30/06/2021 11:55 am
Share:
Retour en haut