Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
overriding function variable outside core files.
timeout_teddy
New
hello vanilla version 2.5.1/php7
$Definition can be change in conf/localephp. thread
Verifying email address link was bugged (0A 3D). I made a change in library/core/classemailphp. So can $this variable be changed outside the core files?
/* Constructor. */
line 46function __construct() {$this->PhpMailer->Encoding = 'quoted-printable';
tofunction __construct() {$this->PhpMailer->Encoding = '8bit';
documentation on function.
if (!function_exists('functionName')) {
function functionName() {
// Do something.
}
}
So would I put a file in conf/functionsgeneralphp with
if (!function_exists('function __construct')) {
function function __construct() {
$this->PhpMailer->Encoding = '8bit';
}
}
>
0
Comments
You need to distinguish between objects methods and functions. If a function is defined in the way that you have described, it can be overriden. Normally you should avoid replacing anything and try to add functionality.
There is an event fired right before a mail is send and you could use it to change the encoding:
Hooking into events is the preferred way in Vanilla to take influence.
You could put this in a small plugin (that you create for this purpose) or in your custom themes (made by you) themehook-file.
okay cool! so time to look at documentation hooking into events and plugins.