Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PEAR.php

function PEAR::_checkDelExpect

This method checks unsets an error code if available

@access private @since PHP 4.3.0

Parameters

mixed error code:

Return value

bool true if the error code was unset, false otherwise

1 call to PEAR::_checkDelExpect()
PEAR::delExpect in vendor/pear/pear-core-minimal/src/PEAR.php
This method deletes all occurrences of the specified element from the expected error codes stack.

File

vendor/pear/pear-core-minimal/src/PEAR.php, line 436

Class

PEAR
Base class for other PEAR classes. Provides rudimentary emulation of destructors.

Code

function _checkDelExpect($error_code) {
    $deleted = false;
    foreach ($this->_expected_errors as $key => $error_array) {
        if (in_array($error_code, $error_array)) {
            unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
            $deleted = true;
        }
        // clean up empty arrays
        if (0 == count($this->_expected_errors[$key])) {
            unset($this->_expected_errors[$key]);
        }
    }
    return $deleted;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal