1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 19:44:09 +02:00

PHP Warning Fixes.

This commit is contained in:
Cameron
2020-12-29 08:04:52 -08:00
parent baed9ec8e5
commit 75f595adb0
13 changed files with 61 additions and 27 deletions

View File

@@ -984,17 +984,18 @@ class e_library_manager
$library['installed'] = false;
// Check whether the library exists.
if(!isset($library['library_path']))
if(!isset($library['library_path']) && !empty($library['machine_name']))
{
$library['library_path'] = $this->detectPath($library['machine_name']);
}
$libraryPath = e107::getParser()->replaceConstants($library['library_path']);
if($library['library_path'] === false || (!file_exists($libraryPath) && substr($libraryPath, 0, 4) != 'http'))
$libraryPath = !empty($library['library_path']) ? e107::getParser()->replaceConstants($library['library_path']) : '';
if(empty($library['library_path']) || (!empty($libraryPath) && !file_exists($libraryPath) && substr($libraryPath, 0, 4) != 'http'))
{
$library['error'] = LAN_NOT_FOUND;
$replace_with = array($library['name']);
$replace_with = array($name);
$library['error_message'] = e107::getParser()->lanVars(LAN_LIBRARY_MANAGER_03, $replace_with, true);
return $library;