final class Error (View source)

Methods

__construct(int $errorNumber, string $errstr, string $errfile, int $errline)

No description

static array
processBacktrace(array $backtrace)

Process backtrace to avoid path disclosures, objects and so on

void
setHideLocation(bool $hide)

Toggles location hiding

void
setBacktrace(array $backtrace)

sets PhpMyAdmin\Error\Error::$_backtrace

void
setLine(int $line)

sets PhpMyAdmin\Error\Error::$_line

void
setFile(string $file)

sets PhpMyAdmin\Error\Error::$_file

string
getHash()

returns unique PhpMyAdmin\Error\Error::$hash, if not exists it will be created

array
getBacktrace(int $count = -1)

returns PhpMyAdmin\Error\Error::$_backtrace for first $count frames pass $count = -1 to get full backtrace.

string
getFile()

returns PhpMyAdmin\Error\Error::$file

int
getLine()

returns PhpMyAdmin\Error\Error::$line

string
getType()

returns type of error

string
getContext()

No description

void
setBBCode(bool $useBBCode)

No description

bool
isDisplayed()

No description

void
markDisplayed()

No description

string
getMessage()

No description

string
getHtmlTitle()

returns title prepared for HTML Title-Tag

string
getTitle()

returns title for error

string
getBacktraceDisplay()

Get HTML backtrace

static string
formatBacktrace(array $backtrace)

return formatted backtrace field

static string
getFunctionCall(array $step)

Formats function call in a backtrace

static string
getArg(mixed $arg, string $function)

Get a single function argument

string
getDisplay()

Gets the error as string of HTML

bool
isUserError()

whether this error is a user error

int
getErrorNumber()

No description

static string
relPath(string $path)

return short relative path to phpMyAdmin basedir

string
getOnlyMessage()

Returns only message string without image & other HTML.

Details

__construct(int $errorNumber, string $errstr, string $errfile, int $errline)

No description

Parameters

int $errorNumber
string $errstr

error message

string $errfile file
int $errline line

static array processBacktrace(array $backtrace)

Process backtrace to avoid path disclosures, objects and so on

Parameters

array $backtrace backtrace

Return Value

array

void setHideLocation(bool $hide)

Toggles location hiding

Parameters

bool $hide

Whether to hide

Return Value

void

void setBacktrace(array $backtrace)

sets PhpMyAdmin\Error\Error::$_backtrace

We don't store full arguments to avoid wakeup or memory problems.

Parameters

array $backtrace backtrace

Return Value

void

void setLine(int $line)

sets PhpMyAdmin\Error\Error::$_line

Parameters

int $line

the line

Return Value

void

void setFile(string $file)

sets PhpMyAdmin\Error\Error::$_file

Parameters

string $file

the file

Return Value

void

string getHash()

returns unique PhpMyAdmin\Error\Error::$hash, if not exists it will be created

Return Value

string PhpMyAdmin\Error\Error::$hash

array getBacktrace(int $count = -1)

returns PhpMyAdmin\Error\Error::$_backtrace for first $count frames pass $count = -1 to get full backtrace.

The same can be done by not passing $count at all.

Parameters

int $count

Number of stack frames.

Return Value

array PhpMyAdmin\Error\Error::$_backtrace

string getFile()

returns PhpMyAdmin\Error\Error::$file

Return Value

string PhpMyAdmin\Error\Error::$file

int getLine()

returns PhpMyAdmin\Error\Error::$line

Return Value

int PhpMyAdmin\Error\Error::$line

string getType()

returns type of error

Return Value

string

type of error

string getContext()

No description

Return Value

string

void setBBCode(bool $useBBCode)

No description

Parameters

bool $useBBCode

Return Value

void

bool isDisplayed()

No description

Return Value

bool

void markDisplayed()

No description

Return Value

void

string getMessage()

No description

Return Value

string

string getHtmlTitle()

returns title prepared for HTML Title-Tag

Return Value

string

HTML escaped and truncated title

string getTitle()

returns title for error

Return Value

string

string getBacktraceDisplay()

Get HTML backtrace

Return Value

string

static string formatBacktrace(array $backtrace)

return formatted backtrace field

Parameters

array $backtrace

Backtrace data

Return Value

string

formatted backtrace

static string getFunctionCall(array $step)

Formats function call in a backtrace

Parameters

array $step

backtrace step

Return Value

string

static string getArg(mixed $arg, string $function)

Get a single function argument

if $function is one of include/require the $arg is converted to a relative path

Parameters

mixed $arg

argument to process

string $function

function name

Return Value

string

string getDisplay()

Gets the error as string of HTML

Return Value

string

bool isUserError()

whether this error is a user error

Return Value

bool

int getErrorNumber()

No description

Return Value

int

static string relPath(string $path)

return short relative path to phpMyAdmin basedir

prevent path disclosure in error message, and make users feel safe to submit error reports

Parameters

string $path

path to be shorten

Return Value

string

shortened path

string getOnlyMessage()

Returns only message string without image & other HTML.

Return Value

string