Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] V9.1.2 Err...
 
Notifications
Clear all

[SOLVED] V9.1.2 Error when adding BillLine

2 Posts
2 Users
0 Reactions
1,916 Views
Louis Heredero
(@baryhobal)
Posts: 49
Active Member
Topic starter
 
[#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;
  }
}

 
Posted : 29 Jun 2021 19H44
babynus
(@babynus)
Posts: 14966
Main Contributor 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.


 
Posted : 30 Jun 2021 11H55
Share:

Scroll to Top