From 4b62777d45ce555a7713034fcea336edfdf71085 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Tue, 5 Apr 2016 21:57:54 -0400 Subject: [PATCH] No JError --- README.markdown | 2 +- script.php | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/README.markdown b/README.markdown index 971803e..2d848d0 100644 --- a/README.markdown +++ b/README.markdown @@ -4,7 +4,7 @@ Tweet Display Back [![Analytics](https://ga-beacon.appspot.com/UA-42602973-2/twe Compatibility =============== -The current release of *Tweet Display Back* is compatible with Joomla! 3.4.0 and newer. Older versions of the module are available for download at https://www.babdev.com/extensions/releases/tweet-display-back +The current release of *Tweet Display Back* is compatible with Joomla! 3.5.0 and newer. Older versions of the module are available for download at https://www.babdev.com/extensions/releases/tweet-display-back Requirements =============== diff --git a/script.php b/script.php index 55c4114..3a2ce9b 100644 --- a/script.php +++ b/script.php @@ -35,30 +35,23 @@ class Mod_TweetDisplayBackInstallerScript * @param string $type The action being performed * @param JInstallerAdapterModule $parent The function calling this method * - * @return boolean True on success, false on failure + * @return boolean * * @since 3.0 + * @throws RuntimeException */ public function preflight($type, $parent) { // PHP Version Check if (version_compare(PHP_VERSION, $this->minimumPHPVersion, 'lt')) { - JError::raiseNotice( - null, JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_PHPVERSION', $this->minimumPHPVersion) - ); - - return false; + throw new RuntimeException(JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_PHPVERSION', $this->minimumPHPVersion)); } // Joomla! Version Check if (version_compare(JVERSION, $this->minimumJoomlaVersion, 'lt')) { - JError::raiseNotice( - null, JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_VERSION', $this->minimumJoomlaVersion) - ); - - return false; + throw new RuntimeException(JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_VERSION', $this->minimumJoomlaVersion)); } return true;