News:

Support the VirtueMart project and become a member

Main Menu

mb_decode_mimeheader in shopfunctions.php

Started by ssc3, December 02, 2022, 16:12:33 PM

Previous topic - Next topic

ssc3

VirtueMart 4.0.8 10748

The mb_decode_mimeheader function in shopfunctions.php relies on mbstring which is a non-default PHP extension.

This causes a server error, if mbstring is not installed.


$subjectMailer= mb_decode_mimeheader('=?utf-8?B?'.base64_encode($subject).'?=');


elsewhere in Virtuemart, mbstring functions are preceded with

if(function_exists(

to check if they exist first and use alternative code if not.
Virtuemart Payment Plugins
https://plugins.online-store.co.uk

Milbo

Thank you, that should work

$subjectMailer= '=?utf-8?B?'.base64_encode($subject).'?=';
if(function_exists('mb_decode_mimeheader')){
$subjectMailer= mb_decode_mimeheader($subjectMailer);
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/