Php 7로 Magento 1.9.2를 테스트하고 있습니다. 모두 작동하는 것처럼 보였지만 갑자기 제품의 이미지를 업로드하려고했습니다. 아래와 같은 오류가 발생했습니다.
Fatal error</b>: Uncaught Error: Function name must be a string in /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php:259
Stack trace:
#0 /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php(180): Varien_File_Uploader->_validateFile()
#1 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php(46): Varien_File_Uploader->save('/home/admin/dom...')
#2 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_Product_GalleryController->uploadAction()
#3 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('upload')
#4 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller in <b>/home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php
누구든지 고치는 법을 알고 있습니까?
259 경 줄의 upload.php에 영향을주는 기능
protected function _validateFile()
{
if ($this->_fileExists === false) {
return;
}
//is file extension allowed
if (!$this->checkAllowedExtension($this->getFileExtension())) {
throw new Exception('Disallowed file type.');
}
//run validate callbacks
foreach ($this->_validateCallbacks as $params) {
if (is_object($params['object']) && method_exists($params['object'], $params['method'])) {
$params['object']->$params['method']($this->_file['tmp_name']);
}
}
}