Пример #1
0
 /**
  * 2016-05-31
  * @used-by \Df\Framework\Form\Element\Url::getElementHtml()
  * @return string
  */
 protected function messageForOthers()
 {
     return !$this->requireHttps() || df_check_https($this->url()) ? $this->url() : 'Looks like your <a href="https://mage2.pro/t/1723" target="_blank">' . '«<b>General</b>» → «<b>Web</b>» → «<b>Base URLs (Secure)</b>' . ' → «<b>Secure Base URL</b>»</a>' . ' option is misconfigured (does not start with «<b>https</b>»).';
 }
Пример #2
0
/**
 * 2016-07-12
 * @param string $url
 * @param string|E $message [optional]
 * @return void
 * @throws E|LE
 */
function df_assert_https($url, $message = null)
{
    if (df_enable_assertions() && !df_check_https($url)) {
        df_error($message ? $message : df_sprintf('The URL «%s» is invalid, because the system expects an URL which starts with «https://».', $url));
    }
}