本文整理汇总了PHP中Errors::errors方法的典型用法代码示例。如果您正苦于以下问题:PHP Errors::errors方法的具体用法?PHP Errors::errors怎么用?PHP Errors::errors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Errors
的用法示例。
在下文中一共展示了Errors::errors方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: merge
public static function merge($error_array)
{
if (!is_array(self::$errors)) {
self::$errors = $error_array;
}
if (is_array($error_array)) {
self::$errors = array_merge(self::$errors, $error_array);
}
}
示例2: array
}
}
*/
// display errors or send pass change request
if (!empty($_REQUEST['settings']) && !empty($personal->errors)) {
$errors = array();
foreach ($personal->errors as $key => $error) {
if (stristr($error, 'login-required-error')) {
$errors[] = Lang::string('settings-' . str_replace('_', '-', $key)) . ' ' . Lang::string('login-required-error');
} elseif (strstr($error, '-')) {
$errors[] = Lang::string($error);
} else {
$errors[] = $error;
}
}
Errors::$errors = $errors;
} elseif (!empty($_REQUEST['settings']) && empty($personal->errors)) {
if (empty($no_token) && !$request_2fa) {
//$authcode2 = (User::$info['verified_authy'] == 'Y' || User::$info['verified_google'] == 'Y') ? false : $authcode1;
//API::settingsChangeId($authcode2);
//API::token($token1);
API::settingsChangeId($authcode1);
API::add('User', 'changePassword', array($personal->info['pass']));
$query = API::send();
if (!empty($query['error'])) {
if ($query['error'] == 'security-com-error') {
Errors::add(Lang::string('security-com-error'));
}
if ($query['error'] == 'authy-errors') {
Errors::merge($query['authy_errors']);
}
示例3:
$header->display();
$header->getJsGlobals();
}
if ($_REQUEST['authy_form']) {
$token1 = preg_replace("/[^0-9]/", "", $_REQUEST['authy_form']['token']);
if (!($token1 > 0)) {
Errors::add('Invalid token.');
}
if (!is_array(Errors::$errors)) {
$response = Google2FA::verify_key(User::$info['authy_id'], $token1);
if (!$response) {
Errors::add('Invalid token.');
}
if (!is_array(Errors::$errors)) {
$_SESSION['token_verified'] = 1;
Errors::$errors = false;
}
}
}
if (User::isLoggedIn() && !(User::$info['verified_authy'] == 'Y' && !($_SESSION['token_verified'] > 0))) {
$CFG->user_id = User::$info['id'];
$CFG->group_id = User::$info['f_id'];
if (!$CFG->bypass || $CFG->url == 'edit_page' && !$_REQUEST['tab_bypass']) {
include_once 'includes/popups.php';
?>
<div id="head">
<?php
$logos = DB::getFiles('settings_files', 1, 'logo', 1);
$logo_img = $logos ? 'uploads/' . $logos[0]['name'] . '_logo.png' : 'images/logo.png';
?>
<div class="logo"><img src="<?php
示例4: clear
public static function clear()
{
self::$errors = array();
}