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

Fixed some php 8 errors #147

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions code/site/controllers/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ private function respond($response)
*/
private function resetDocumentType()
{
if (!headers_sent())
{
foreach (headers_list() as $header)
{
header_remove($header);
}
}
if (!headers_sent())
{
foreach (headers_list() as $header)
{
header_remove(explode(":", $header, 2)[0]);
}
}
//JResponse::clearHeaders();
}
}
8 changes: 4 additions & 4 deletions code/site/libraries/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ final public function fetchResource($resource_name = null)
*
* @since 1.0
*/
final private function checkInternally($resource_name)
private function checkInternally($resource_name)
{
if (! method_exists($this, $resource_name))
{
Expand All @@ -356,7 +356,7 @@ final private function checkInternally($resource_name)
*
* @since 1.0
*/
final private function checkRequestLimit()
private function checkRequestLimit()
{
$app = Factory::getApplication();
$limit = $this->params->get('request_limit', 0);
Expand Down Expand Up @@ -415,7 +415,7 @@ final private function checkRequestLimit()
*
* @since 1.0
*/
final private function log()
private function log()
{
if (! $this->params->get('log_requests'))
{
Expand Down Expand Up @@ -476,7 +476,7 @@ final private function log()
*
* @since 1.0
*/
final private function lastUsed()
private function lastUsed()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xRealNeon functions are deliberately made final here.
can you please specify the case in which you need to remove final keyword?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Private methods cannot be final as they are never overridden by other classes

{
$app = Factory::getApplication();
$table = Table::getInstance('Key', 'ApiTable');
Expand Down