PluginProbe
The WP Remote WordPress Plugin / trunk
The WP Remote WordPress Plugin vtrunk
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | php_error_monitoring/monitoring.php +9 -3 5.72trunk View file →
@@ -81,8 +81,9 @@
81 81 }
82 82 }
83 83
84 84 public static function setPhpErrorHandler() {
85 + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler -- Custom error handling
85 86 set_error_handler(array(self::class, 'errorHandler'), self::$error_level);
86 87 register_shutdown_function(array(self::class, 'handleShutdown'));
87 88 }
88 89
@@ -123,8 +124,9 @@
123 124 $data = array();
124 125
125 126 $serialized_backtrace = '';
126 127 if (self::$include_backtrace) {
128 + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace -- Needed for stack trace functionality
127 129 $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, self::$max_backtrace_frames);
128 130
129 131 $keys = array_flip(array('file', 'line', 'function'));
130 132 foreach ($backtrace as &$frame) {
@@ -137,9 +139,9 @@
137 139
138 140 $data["md5"] = md5($code . '-' . $message . '-' . $line . '-' . $file . '-' . $serialized_backtrace);
139 141
140 142 if (!self::canCaptureError($data['md5'])) {
141 - return;
143 + return false;
142 144 }
143 145
144 146 $data["error_code"] = $code;
145 147 $data["error_message"] = $message;
@@ -144,12 +146,16 @@
144 146 $data["error_code"] = $code;
145 147 $data["error_message"] = $message;
146 148 $data["error_line"] = $line;
147 149 $data["error_file"] = $file;
148 - $uri = array_key_exists('REQUEST_URI', $_SERVER) ? $_SERVER['REQUEST_URI'] : '';
150 + $uri = WPRHelper::getRawParam('SERVER', 'REQUEST_URI');
151 + if (!isset($uri)) {
152 + $uri = "";
153 + }
149 154 $data["request_path"] = parse_url($uri, PHP_URL_PATH);
150 155 $data["request_id"] = WPRInfo::getRequestID();
151 156
152 157 self::saveError(maybe_serialize($data));
158 + return false;
153 159 }
154 160 }
155 -endif;
161 +endif;