{"action":"opened","issue":{"url":"https://api.github.com/repos/cubecart/v6/issues/1705","repository_url":"https://api.github.com/repos/cubecart/v6","labels_url":"https://api.github.com/repos/cubecart/v6/issues/1705/labels{/name}","comments_url":"https://api.github.com/repos/cubecart/v6/issues/1705/comments","events_url":"https://api.github.com/repos/cubecart/v6/issues/1705/events","html_url":"https://github.com/cubecart/v6/issues/1705","id":250194423,"number":1705,"title":"Debug Red Query May Not Be an Error","user":{"login":"bhsmither","id":4073092,"avatar_url":"https://avatars3.githubusercontent.com/u/4073092?v=4","gravatar_id":"","url":"https://api.github.com/users/bhsmither","html_url":"https://github.com/bhsmither","followers_url":"https://api.github.com/users/bhsmither/followers","following_url":"https://api.github.com/users/bhsmither/following{/other_user}","gists_url":"https://api.github.com/users/bhsmither/gists{/gist_id}","starred_url":"https://api.github.com/users/bhsmither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhsmither/subscriptions","organizations_url":"https://api.github.com/users/bhsmither/orgs","repos_url":"https://api.github.com/users/bhsmither/repos","events_url":"https://api.github.com/users/bhsmither/events{/privacy}","received_events_url":"https://api.github.com/users/bhsmither/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-15T00:59:58Z","updated_at":"2017-08-15T00:59:58Z","closed_at":null,"body":"In commit https://github.com/cubecart/v6/commit/f998d334b729726e5ce7003ced3aa7a3893d7976, some code was added to the Debug class;\r\n```\r\nif($type=='error' || preg_match('/CubeCart_system_error_log/',$message)) {\r\n  $tag = empty($tag) ? 'ERROR' : 'ERROR - '.$tag;\r\n  $colour = 'FF0000';\r\n}\r\n```\r\nPresumably to flag the query that INSERTed data to this table.\r\n\r\nBut, since other queries can be made against this table, these other red-flagged entries in the Debug list may be misleading.\r\n\r\nFor example, in admin, Maintenance, when issuing `SHOW TABLE STATUS` and `SHOW INDEX FROM`, those queries will show in red and have ERROR. As well as any SELECT, DELETE, and TRUNCATE query to show the System Error Log records.\r\n\r\nSuggest looking for INSERT only:\r\n```\r\npreg_match('/^INSERT .*CubeCart_system_error_log/',$message)\r\n```\r\n"}}
{"actor":{"display_login":"bhsmither"}}