PHP var_dump() returns NULL value and Object(stdclass) at the same time from a mysql query, how?

I am running a var_dump and getting an unexpected result. It is showing me NULL and returning a object at the same time. I am unsure why and hoping someone might shed some light on this for me?

My query -

$result = $wpdb->get_results( $wpdb->prepare("SELECT * FROM {$wpdb->prefix}custom_form_submission WHERE fid=%d", $id ) );

The PHP - $results = $result[0]; var_dump($results);

The above outputs:

NULL object(stdClass)#3802 (29) { [“fid”]=> string(2) “11” [“vendorID”]=> string(1) “3” [“userID”]=> string(2) “72” [“productID”]=> string(3) “302” [“org_name”]=> string(0) “” [“fname”]=> string(5) “102pm” [“lname”]=> string(0) “” [“phone”]=> string(1) “0” [“delivery_date”]=> string(10) “0000-00-00” [“first_performance”]=> string(10) “0000-00-00” [“last_performance”]=> string(10) “0000-00-00” [“load_out_date”]=> string(10) “0000-00-00” [“truck_height_dock”]=> string(18) “Please Select One:” [“fly_drop_pieces”]=> string(0) “” [“estimated_width”]=> string(1) “0” [“estimated_depth”]=> string(1) “0” [“estimated_height”]=> string(1) “0” [“double_cast”]=> string(0) “” [“number_of_men”]=> string(1) “0” [“number_of_female”]=> string(1) “0” [“non_casting”]=> string(0) “” [“non_casting_desc”]=> string(0) “” [“message”]=> string(0) “” [“price_status”]=> string(3) “one” [“status”]=> string(6) “active” [“date_created”]=> string(19) “2021-04-12 13:02:22” [“Last Updated”]=> string(19) “2021-05-10 22:44:27” [“is_accepted”]=> string(1) “0” [“is_declined”]=> string(1) “0” }

If I var_dump $id then I get NULL string(2) “11”

When I dump $result the output looks like -

array(0) { } array(1) { [0]=> object(stdClass)#3802 (29) { [“fid”]=> string(2) “11” [“vendorID”]=> string(1) “3” [“userID”]=> string(2) “72” [“productID”]=> string(3) “302” [“org_name”]=> string(0) “” [“fname”]=> string(5) “102pm” [“lname”]=> string(0) “” [“phone”]=> string(1) “0” [“delivery_date”]=> string(10) “0000-00-00” [“first_performance”]=> string(10) “0000-00-00” [“last_performance”]=> string(10) “0000-00-00” [“load_out_date”]=> string(10) “0000-00-00” [“truck_height_dock”]=> string(18) “Please Select One:” [“fly_drop_pieces”]=> string(0) “” [“estimated_width”]=> string(1) “0” [“estimated_depth”]=> string(1) “0” [“estimated_height”]=> string(1) “0” [“double_cast”]=> string(0) “” [“number_of_men”]=> string(1) “0” [“number_of_female”]=> string(1) “0” [“non_casting”]=> string(0) “” [“non_casting_desc”]=> string(0) “” [“message”]=> string(0) “” [“price_status”]=> string(3) “one” [“status”]=> string(6) “active” [“date_created”]=> string(19) “2021-04-12 13:02:22” [“Last Updated”]=> string(19) “2021-05-10 22:44:27” [“is_accepted”]=> string(1) “0” [“is_declined”]=> string(1) “0” } }

as per request results from echo '<pre style="border:1px solid red;">', var_export($results, true), '</pre>';

enter image description here

EDIT - Adding functions.php custom end point code.

`add_action('wcmp_init', 'after_wcmp_init');
function after_wcmp_init() {
    // add a setting field to wcmp endpoint settings page
    add_action('settings_vendor_general_tab_options', 'add_custom_endpoint_option');
    // save setting option for custom endpoint
    add_filter('settings_vendor_general_tab_new_input', 'save_custom_endpoint_option', 10, 2);
    // add custom endpoint
    add_filter('wcmp_endpoints_query_vars', 'add_wcmp_endpoints_query_vars');
    // add custom menu to vendor dashboard
    add_filter('wcmp_vendor_dashboard_nav', 'add_tab_to_vendor_dashboard');
    
    // display content of custom endpoint
    add_action('wcmp_vendor_dashboard_booking-requests_endpoint', 'custom_menu_endpoint_content');
    add_action('wcmp_vendor_dashboard_bookings-rental-to-paperwork_endpoint', 'custom_menu_endpoint_wrtp_content');
}

function add_custom_endpoint_option($settings_tab_options) {
    $settings_tab_options['sections']['wcmp_vendor_general_settings_endpoint_ssection']['fields']['wcmp_custom_vendor_endpoint'] = array('title' => __('Booking Detail', 'dc-woocommerce-multi-vendor'), 'type' => 'text', 'id' => 'wcmp_custom_vendor_endpoint', 'label_for' => 'wcmp_custom_vendor_endpoint', 'name' => 'wcmp_custom_vendor_endpoint', 'hints' => __('Set endpoint for custom menu page', 'dc-woocommerce-multi-vendor'), 'placeholder' => 'booking-requests');
    return $settings_tab_options;
}

function save_custom_endpoint_option($new_input, $input) {
    if (isset($input['wcmp_custom_vendor_endpoint']) && !empty($input['wcmp_custom_vendor_endpoint'])) {
        $new_input['wcmp_custom_vendor_endpoint'] = sanitize_text_field($input['wcmp_custom_vendor_endpoint']);
    }
    return $new_input;
}
function add_wcmp_endpoints_query_vars($endpoints) {
    $endpoints['booking-requests'] = array(
        'label' => __('Booking Detail', 'dc-woocommerce-multi-vendor'),
        'endpoint' => get_wcmp_vendor_settings('wcmp_custom_vendor_endpoint', 'vendor', 'general', 'booking-requests')
    );
    return $endpoints;
}
function add_tab_to_vendor_dashboard($nav) {
    $nav['custom_wcmp_nenu'] = array(
    /* 'label' => __('Custom Menu', 'dc-woocommerce-multi-vendor'), // menu label */
    'url' => wcmp_get_vendor_dashboard_endpoint_url('booking-requests'), // menu url
    /* 'capability' => true, // capability if any
    'position' => 75, // position of the menu
    'submenu' => array(), // submenu if any
    'link_target' => '_self', */
    /* 'nav_icon' => 'dashicons-admin-generic', // menu icon */
    );
    return $nav;
}
function custom_menu_endpoint_content($id){
    include 'dc-product-vendor/bookings-requests-detail.php';
}

function custom_menu_endpoint_wrtp_content($id){
    include 'dc-product-vendor/bookings-rental-to-paperwork.php';`