Skip to content

Commit

Permalink
Merge pull request PHPMailer#136 from glensc/php-5.2-autoloader
Browse files Browse the repository at this point in the history
fix autoloader for 5.2. refs 7c1d0f9. PHPMailer#120
  • Loading branch information
Synchro committed Nov 9, 2013
2 parents 492468c + 7d02a14 commit 6730be8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PHPMailerAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ function PHPMailerAutoload($classname)

if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
//SPL autoloading was introduced in PHP 5.1.2
spl_autoload_register('PHPMailerAutoload', true, true);
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register('PHPMailerAutoload', true, true);
} else {
spl_autoload_register('PHPMailerAutoload');
}
} else {
//Fall back to traditional autoload for old PHP versions
function __autoload($classname)
Expand Down

0 comments on commit 6730be8

Please sign in to comment.