myView::getMasterFilter(): Return value must be of type string, null returned

I get the error mentioned in the subject line in an Add Page. I found the code in phpmaker 2025.5 that caused the error:

/**
     * Get master filter
     *
     * @param object $masterTable Master Table
     * @param array $keys Detail Keys
     * @return mixed NULL is returned if all keys are empty, Empty string is returned if some keys are empty and is required
     */
    public function getMasterFilter(DbTableBase $masterTable, array $keys): string
    {
        ...
        return null; // All null values and no required fields
    }

it seems to me that this is a bug as the signature suggest that null value shoudn’t be returned.

Are there any suggestions for workarounds?

Thx