diff --git a/application/modules/bulletin/controllers/AdminController.php b/application/modules/bulletin/controllers/AdminController.php index 29e5dc9fec40f5e5e16fc8a435e408dc73dfa9a9..4adfb294ea593f9e0d03fc23e19bcaa67b5ed0ae 100644 --- a/application/modules/bulletin/controllers/AdminController.php +++ b/application/modules/bulletin/controllers/AdminController.php @@ -79,7 +79,7 @@ class Bulletin_AdminController extends Creq_Controller_Action // get file path and name for major $filePath = 'data' .DIRECTORY_SEPARATOR. Bulletin_RepositoryModel::getInstance()->getFilePathForCollegeMajorYear($in['college'], $major, $currentYear); - if (!$filePath) { + if (!is_file($filePath)) { $this->_helper->getHelper('FlashMessenger')->addMessage('Unable to find an existing file for that college/major.'); $this->redirect('/bulletin/admin/change-major-name'); } @@ -147,7 +147,7 @@ class Bulletin_AdminController extends Creq_Controller_Action // get file path and name for major $filePath = 'data' .DIRECTORY_SEPARATOR. Bulletin_RepositoryModel::getInstance()->getFilePathForCollegeMajorYear($in['college'], $major, $currentYear); - if (!$filePath) { + if (!is_file($filePath)) { $this->_helper->getHelper('FlashMessenger')->addMessage('Unable to find an existing file for that college/major.'); $this->redirect('/bulletin/admin/change-major-name'); } @@ -468,7 +468,7 @@ class Bulletin_AdminController extends Creq_Controller_Action // get file path and name for major $filePath = 'data' .DIRECTORY_SEPARATOR. Bulletin_RepositoryModel::getInstance()->getFilePathForCollegeMajorYear($in['college'], $major, $currentYear); - if (!$filePath) { + if (!is_file($filePath)) { $this->_helper->getHelper('FlashMessenger')->addMessage('Unable to find an existing file for that college/major.'); $this->redirect('/bulletin/admin/remove-major'); }