Joomla-Bible-Study / Proclaim

Joomla Proclaim Component - Christian Web Ministries
https://www.christianwebministries.org/
GNU General Public License v3.0
10 stars 9 forks source link

Import DB Error #951

Closed tomfuller2 closed 7 months ago

tomfuller2 commented 1 year ago

Describe the bug Try to import an existing db from a file.

Errors:

Joomla\CMS\Filesystem\Folder::files: Path is not a folder. Path: [ROOT]/administrator/components/com_proclaim/install/sql/updates/mysql

Joomla\CMS\Filesystem\Folder::files: Path is not a folder. Path: [ROOT]/administrator/components/com_proclaim/install/updates/

usort(): Argument #1 ($array) must be of type array, string given JROOT/administrator/components/com_proclaim/src/Model/CWMInstallModel.php:424

Line in question:

$files = str_replace('.sql', '', Folder::files(JPATH_ADMINISTRATOR . $this->filePath, '.sql$')); $php = str_replace('.php', '', Folder::files(JPATH_ADMINISTRATOR . $this->phpPath, '.php$')); 424 usort($files, 'version_compare'); usort($php, 'version_compare');

DB does import, however. Not sure why we fire off the import here.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

bcordis commented 1 year ago

@tomfuller2 We need to decide whether to use PHP for upgrading or remove it.

bcordis commented 7 months ago

There are no PHP files to test or need for now, but I will keep the code in.