Skip to content

Commit 68b4fbd

Browse files
committed
Merge pull request #9 from sasule/master
Fix to missing object in loader.php
2 parents 66af613 + 7e1ae60 commit 68b4fbd

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

MailLibrary/loader.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,24 @@
66
require_once "exceptions.php";
77

88
spl_autoload_register(function ($type) {
9-
static $paths = array(
10-
'greeny\maillibrary\connection' => 'Connection.php',
11-
'greeny\maillibrary\mailbox' => 'Mailbox.php',
12-
'greeny\maillibrary\selection' => 'Selection.php',
13-
'greeny\maillibrary\mail' => 'Mail.php',
14-
'greeny\maillibrary\contactlist' => 'ContactList.php',
15-
'greeny\maillibrary\attachment' => 'Attachment.php',
16-
'greeny\maillibrary\structures\istructure' => 'Structures/IStructure.php',
17-
'greeny\maillibrary\structures\imapstructure' => 'Structures/ImapStructure.php',
18-
'greeny\maillibrary\drivers\idriver' => 'Drivers/IDriver.php',
19-
'greeny\maillibrary\drivers\imapdriver' => 'Drivers/ImapDriver.php',
20-
'greeny\maillibrary\extensions\maillibraryextension' => 'Extensions/MailLibraryExtension.php',
21-
);
9+
static $paths = array(
10+
'greeny\maillibrary\connection' => 'Connection.php',
11+
'greeny\maillibrary\mailbox' => 'Mailbox.php',
12+
'greeny\maillibrary\selection' => 'Selection.php',
13+
'greeny\maillibrary\mail' => 'Mail.php',
14+
'greeny\maillibrary\contactlist' => 'ContactList.php',
15+
'greeny\maillibrary\contact' => 'Contact.php',
16+
'greeny\maillibrary\attachment' => 'Attachment.php',
17+
'greeny\maillibrary\structures\istructure' => 'Structures/IStructure.php',
18+
'greeny\maillibrary\structures\imapstructure' => 'Structures/ImapStructure.php',
19+
'greeny\maillibrary\drivers\idriver' => 'Drivers/IDriver.php',
20+
'greeny\maillibrary\drivers\imapdriver' => 'Drivers/ImapDriver.php',
21+
'greeny\maillibrary\extensions\maillibraryextension' => 'Extensions/MailLibraryExtension.php',
22+
);
2223

23-
$type = ltrim(strtolower($type), '\\'); // PHP namespace bug #49143
24+
$type = ltrim(strtolower($type), '\\'); // PHP namespace bug #49143
2425

25-
if (isset($paths[$type])) {
26-
require_once __DIR__ . '/' . $paths[$type];
27-
}
26+
if (isset($paths[$type])) {
27+
require_once __DIR__ . '/' . $paths[$type];
28+
}
2829
});

0 commit comments

Comments
 (0)