cubecart / v6

CubeCart Version 6
https://cubecart.com
72 stars 58 forks source link

Passing Null to Type String #3519

Closed bhsmither closed 6 months ago

bhsmither commented 6 months ago

In orders.index.inc.php, line 621, $summary['ship_date'] might be null, but this is an illegal variable type for str_replace().

Suggest, for this part:

str_replace('-', '', $summary['ship_date'] ?? 0)
bhsmither commented 6 months ago

Then, on line 623, $summary['ship_tracking'] might be null, but this is an illegal variable type for preg_replace() found in parseUrlToLink().

Suggest, for this part:

parseUrlToLink($summary['ship_tracking'] ?? '');

or, catch all occasions:

function parseUrlToLink($text = '', $target = '_blank')
abrookbanks commented 6 months ago

Thanks.