Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Reset time limit back to original value #11620

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/Forms/GridField/GridFieldPrintButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,26 @@ public function getURLHandlers($gridField)
*/
public function handlePrint($gridField, $request = null)
{
$orig = ini_get('max_execution_time');
set_time_limit(60);
Requirements::clear();

$data = $this->generatePrintData($gridField);

$this->extend('updatePrintData', $data);

$ret = null;
if ($data) {
return $data->renderWith([
$ret = $data->renderWith([
get_class($gridField) . '_print',
GridField::class . '_print',
]);
}
// Reset the time limit, this is done mainly to prevent the 60 second time limit from
// making unrelated unit-tests run out of execution time when running a testsuite.
set_time_limit($orig);

return null;
return $ret;
}

/**
Expand Down