Skip to content

Return Value Error - DatabaseAbstruct::buildQuery() return null but must be string #2158

Closed
@casheeeewnuts

Description

This is:

- [x] a bug report

What is the expected behavior?

DatabaseAbstruct::buildQuery() return string

What is the current behavior?

DatabaseAbstruct::buildQuery() return null but it must be string, throwed Return Value Error

What are the steps to reproduce?

An error occurs when I try to export a spreadsheet with the following formula,

=AVERAGEIF(A:A, "", B:B)

when a blank cell is specified in the search condition.

<?php

require __DIR__ . '/vendor/autoload.php';

$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();

// Create new Spreadsheet object
$spreadSheet = $reader->load('example.xlsx');

$writer = new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadSheet);
$writer->save('php://output'); // anywhere

// add code that show the issue here...

Which versions of PhpSpreadsheet and PHP are affected?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions