I found the solution and will post here on the off-chance it helps someone in the future.
The bottom line is there was a typo in a function that responded to POST requests.
I narrowed it down to one file by disabling portions of my plugin in the activation class. By doing this I determined the error only occurred when this file/function was included:
if ( $_SERVER['REQUEST_METHOD'] = 'POST' ) {
if ( !empty($_POST['update']) ) {
if ( $_POST['update'] == "clear") {
$now = new DateTime;
$now->setTimezone(new DateTimeZone(get_option('timezone_string')));
update_option('time-tracker-sql-result', array('result'=>'success','updated'=>$now->format('m-d-Y g:i A'),'error'=>'N/A', 'file'=>"", 'function'=>""));
}
}
}
The problem is in my first line, I had = instead of ==
The corrected code is:
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
if ( !empty($_POST['update']) ) {
if ( $_POST['update'] == "clear") {
$now = new DateTime;
$now->setTimezone(new DateTimeZone(get_option('timezone_string')));
update_option('time-tracker-sql-result', array('result'=>'success','updated'=>$now->format('m-d-Y g:i A'),'error'=>'N/A', 'file'=>"", 'function'=>""));
}
}
}
Once this was fixed, the error disappeared and my /wp-json was visible again!