aboutsummaryrefslogtreecommitdiff
path: root/h-source/Library/Call.php
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2021-10-12 08:27:09 +1100
committerYuchen Pei <hi@ypei.me>2021-10-12 08:27:09 +1100
commit72cce24864b064b5762f4fe97fdf40d8d2ad4b51 (patch)
tree408f687c56f060aaac18622d2b091f6e080f76d4 /h-source/Library/Call.php
parenta349d5115056f17496bba1f88f8043e87de6d9bd (diff)
parenta433241c0aff14110d1355f904d3dace8b6bae6b (diff)
Merge branch 'development' into h-node
Diffstat (limited to 'h-source/Library/Call.php')
-rwxr-xr-xh-source/Library/Call.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/h-source/Library/Call.php b/h-source/Library/Call.php
index c75508b..a9145c2 100755
--- a/h-source/Library/Call.php
+++ b/h-source/Library/Call.php
@@ -257,7 +257,7 @@ function getQueryString()
return '';
}
-function __autoload($className)
+function autoloader($className)
{
$backupName = $className;
@@ -290,6 +290,7 @@ function __autoload($className)
}
}
+spl_autoload_register('autoloader');
try {
@@ -324,7 +325,8 @@ try {
//load the files defined inside Config/Autoload.php
foreach (Autoload::$files as $file)
{
- $ext = strtolower(end(explode('.', $file)));
+ $parts = explode('.', $file);
+ $ext = strtolower(end($parts));
$path = ROOT . DS . APPLICATION_PATH . DS . 'Include' . DS . $file;
if (file_exists($path) and $ext === 'php')
{
@@ -354,4 +356,4 @@ try {
echo '<div class="alert">Message: '.$e->getMessage().'</div>';
-} \ No newline at end of file
+}