PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 5.7.2
Defender Security – Malware Scanner, Login Security & Firewall v5.7.2
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / vendor / thecodingmachine / safe / generated / errorfunc.php

errorfunc.php in Defender Security – Malware Scanner, Login Security & Firewall 5.7.2, at vendor/thecodingmachine/safe/generated/errorfunc.php

83 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Safe;
4
5 use Safe\Exceptions\ErrorfuncException;
6
7 /**
8 * Sends an error message to the web server's error log or to a file.
9 *
10 * @param string $message The error message that should be logged.
11 * @param int $message_type Says where the error should go. The possible message types are as
12 * follows:
13 *
14 *
15 * error_log log types
16 *
17 *
18 *
19 * 0
20 *
21 * message is sent to PHP's system logger, using
22 * the Operating System's system logging mechanism or a file, depending
23 * on what the error_log
24 * configuration directive is set to. This is the default option.
25 *
26 *
27 *
28 * 1
29 *
30 * message is sent by email to the address in
31 * the destination parameter. This is the only
32 * message type where the fourth parameter,
33 * extra_headers is used.
34 *
35 *
36 *
37 * 2
38 *
39 * No longer an option.
40 *
41 *
42 *
43 * 3
44 *
45 * message is appended to the file
46 * destination. A newline is not automatically
47 * added to the end of the message string.
48 *
49 *
50 *
51 * 4
52 *
53 * message is sent directly to the SAPI logging
54 * handler.
55 *
56 *
57 *
58 *
59 *
60 * @param string $destination The destination. Its meaning depends on the
61 * message_type parameter as described above.
62 * @param string $extra_headers The extra headers. It's used when the message_type
63 * parameter is set to 1.
64 * This message type uses the same internal function as
65 * mail does.
66 * @throws ErrorfuncException
67 *
68 */
69 function error_log(string $message, int $message_type = 0, string $destination = null, string $extra_headers = null): void
70 {
71 error_clear_last();
72 if ($extra_headers !== null) {
73 $result = \error_log($message, $message_type, $destination, $extra_headers);
74 } elseif ($destination !== null) {
75 $result = \error_log($message, $message_type, $destination);
76 } else {
77 $result = \error_log($message, $message_type);
78 }
79 if ($result === false) {
80 throw ErrorfuncException::createFromPhpError();
81 }
82 }
83