friendica / friendica

Friendica Communications Platform
https://friendi.ca
GNU Affero General Public License v3.0
1.43k stars 341 forks source link

[2020.12] PHP Notices #9252

Closed MrPetovan closed 3 years ago

MrPetovan commented 4 years ago

Please report here any PHP Notice message obtained running the 2020.09 stable or 2020.12-dev versions.

Closes #8877

SpcCw commented 4 years ago

Hopefully this isn't another one of my personal DB problems :)

PHP Notice:  Undefined index: @context in /usr/share/nginx/friends/src/Protocol/ActivityPub/Processor.php on line 742" while reading response header from upstream, client: [IP REMOVED], server: friends.deko.cloud, request: "POST /inbox HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "friends.deko.cloud"
MrPetovan commented 4 years ago

Probably not, as a federated service we receive a lot of badly formed data from remote servers.

AlfredSK commented 4 years ago

Only variables should be passed by reference in .../src/Module/Admin/Addons/Details.php on line 48

2020.12-dev PHP 7.4

ghost commented 4 years ago

Stable

PHP Notice: iconv(): Wrong charset, conversion fromUTF-8><meta content=' to UTF-8//TRANSLIT' is not allowed in friendica/src/Util/ParseUrl.php on line 224

annando commented 4 years ago
PHP Notice:  iconv(): Wrong charset, conversion from `utf-8,%3Csvg%20xmlns%3D' to `UTF-8//TRANSLIT' is not allowed in /src/Util/ParseUrl.php on line 224
PHP Notice:  iconv(): Wrong charset, conversion from `utf-8><meta http-equiv=cleartype content=' to `UTF-8//TRANSLIT' is not allowed in /src/Util/ParseUrl.php on line 224

Links are:

2020-09-24T16:11:18Z worker [INFO]: add_page_info_to_body: fetch page info for body {"body":"\"This transparency is absent when we need it most. Amid a pandemic and on the edge of a presidential election, health disinformation and misleading political ads are crowding our feeds.\"\n\nOur VP Advocacy @[url=https:\/\/twitter.com\/ashleyboyd]ashleyboyd[\/url] in @[url=https:\/\/twitter.com\/FastCompany]FastCompany[\/url].\n[url=https:\/\/bit.ly\/3kL8ZCS]bit.ly\/3kL8ZCS[\/url]","worker_id":"db7ed29","worker_cmd":"twitter_sync_run"} - {"file":"PageInfo.php","line":45,"function":"searchAndAppendToBody","uid":"9a157b","process_id":25084}
2020-09-24T16:11:19Z worker [NOTICE]: Curl redirect. {"url":"https:\/\/bit.ly\/3kL8ZCS","to":"https:\/\/www.fastcompany.com\/90553482\/big-tech-needs-new-powerful-government-watchdogs-to-enforce-real-transparency"} - {"file":"HTTPRequest.php","line":197,"function":"get","uid":"9a157b","process_id":25084}
2020-09-24T16:11:19Z worker [NOTICE]: Curl redirect. {"url":"https:\/\/bit.ly\/3kL8ZCS","to":"https:\/\/www.fastcompany.com\/90553482\/big-tech-needs-new-powerful-government-watchdogs-to-enforce-real-transparency"} - {"file":"HTTPRequest.php","line":197,"function":"get","uid":"9a157b","process_id":25084}
2020-09-24T16:11:20Z worker [INFO]: detected charset utf-8,%3Csvg%20xmlns%3D {"worker_id":"db7ed29","worker_cmd":"twitter_sync_run"} - {"file":"ParseUrl.php","line":223,"function":"getSiteinfo","uid":"9a157b","process_id":25084}

Addressed in #9274 and:

2020-09-24T21:26:33Z worker [INFO]: add_page_info_to_body: fetch page info for body {"body":"New: Michigan lawmakers approve bill that: \n- Gives clerks more time to process absentee ballots \n- Allows absentee ballot counting shifts \n- Requires video monitoring for some drop boxes\n- Requires clerks follow up on absentee ballot signature issues [url=https:\/\/www.freep.com\/story\/news\/politics\/elections\/2020\/09\/24\/more-time-process-absentee-ballots-michigan\/3518646001\/]freep.com\/story\/news\/pol\u2026[\/url]","worker_id":"90ed6e4","worker_cmd":"twitter_sync_run"} - {"file":"PageInfo.php","line":45,"function":"searchAndAppendToBody","uid":"136d2e","process_id":6589}
2020-09-24T21:26:33Z worker [NOTICE]: Curl redirect. {"url":"https:\/\/www.freep.com\/story\/news\/politics\/elections\/2020\/09\/24\/more-time-process-absentee-ballots-michigan\/3518646001\/","to":"https:\/\/eu.freep.com\/story\/news\/politics\/elections\/2020\/09\/24\/more-time-process-absentee-ballots-michigan\/3518646001\/"} - {"file":"HTTPRequest.php","line":197,"function":"get","uid":"136d2e","process_id":6589}
2020-09-24T21:26:33Z worker [NOTICE]: Curl redirect. {"url":"https:\/\/www.freep.com\/story\/news\/politics\/elections\/2020\/09\/24\/more-time-process-absentee-ballots-michigan\/3518646001\/","to":"https:\/\/eu.freep.com\/story\/news\/politics\/elections\/2020\/09\/24\/more-time-process-absentee-ballots-michigan\/3518646001\/"} - {"file":"HTTPRequest.php","line":197,"function":"get","uid":"136d2e","process_id":6589}
2020-09-24T21:26:33Z worker [INFO]: detected charset utf-8><meta http-equiv=cleartype content= {"worker_id":"90ed6e4","worker_cmd":"twitter_sync_run"} - {"file":"ParseUrl.php","line":223,"function":"getSiteinfo","uid":"136d2e","process_id":6589}
MrPetovan commented 4 years ago

Don't parse HTML with regular expression, I know. Refining the expression I suppose.

AlfredSK commented 4 years ago

2020.12-dev:

Undefined index: accounttype in .../src/Module/Conversation/Community.php on line 119

Fixed by #9307

AlfredSK commented 4 years ago

2020.12-dev:

Undefined index: object_object_type in .../src/Protocol/ActivityPub/Receiver.php on line 589

ghost commented 4 years ago

dev

PHP Notice: iconv(): Detected an illegal character in input string in /friendica/src/Util/ParseUrl.php on line 232

AlfredSK commented 4 years ago

2020.12-dev: Hundreds of...

PHP Notice: Undefined offset: 1 in .../mod/network.php on line 135

Probably caused by #9367

Edit: Fixed by https://github.com/friendica/friendica/pull/9370

AlfredSK commented 4 years ago

I get 100 notices per minute about...

Array to string conversion in .../vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 59

2020.12-dev PHP 7.4

Caused by https://github.com/friendica/friendica/pull/9400 I guess.

Also fetching remote images doesn't work anymore. Images that are fetched since the PR has been merged locally only show the browser's broken image placeholder icon.

Fixed by #9414

ghost commented 4 years ago

I get 100 notices per minute about...

Array to string conversion in .../vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 59

2020.12-dev PHP 7.4

Caused by #9400 I guess.

I can confirm

Fixed by #9414

AlfredSK commented 4 years ago

2020.12-dev PHP 7.4:

Undefined index: nobody in .../src/Util/HTTPSignature.php on line 450

...quite a lot of it.

Introduced by #9437

Fixed by https://github.com/friendica/friendica/pull/9442

AlfredSK commented 4 years ago

2020.12-dev PHP 7.4

Undefined offset: 0 in .../src/Module/Conversation/Network.php on line 195
Trying to access array offset on value of type null in .../src/Module/Conversation/Network.php on line 195
Undefined offset: -1 in .../src/Module/Conversation/Network.php on line 196
Trying to access array offset on value of type null in .../src/Module/Conversation/Network.php on line 196

Addressed in #9523

ghost commented 4 years ago

Dev

PHP Notice:  Undefined index: alias in /friendica/src/Model/Contact.php on line 1107
PHP Notice:  Undefined index: addr in /friendica/src/Model/Contact.php on line 1107

Addressed in #9543

triantos commented 4 years ago

I'm in the dev branch. Getting this from my worker.php script:

PHP Notice:  Undefined index: dfrn in /var/www/friendica/src/Protocol/ActivityPub/Transmitter.php on line 550
PHP Stack trace:
PHP   1. {main}() /var/www/friendica/bin/worker.php:0
PHP   2. Friendica\Core\Worker::processQueue() /var/www/friendica/bin/worker.php:81
PHP   3. Friendica\Core\Worker::execute() /var/www/friendica/src/Core/Worker.php:105
PHP   4. Friendica\Core\Worker::execFunction() /var/www/friendica/src/Core/Worker.php:330
PHP   5. call_user_func_array:{/var/www/friendica/src/Core/Worker.php:429}() /var/www/friendica/src/Core/Worker.php:429
PHP   6. Friendica\Worker\Notifier::execute() /var/www/friendica/src/Core/Worker.php:429
PHP   7. Friendica\Worker\Notifier::activityPubDelivery() /var/www/friendica/src/Worker/Notifier.php:177
PHP   8. Friendica\Protocol\ActivityPub\Transmitter::fetchTargetInboxes() /var/www/friendica/src/Worker/Notifier.php:789
PHP   9. Friendica\Protocol\ActivityPub\Transmitter::createPermissionBlockForItem() /var/www/friendica/src/Protocol/ActivityPub/Transmitter.php:748

Addressed in #9543

AlfredSK commented 4 years ago

2020.12-dev

Undefined index: HTTP_IF_NONE_MATCH in .../view/theme/vier/style.php on line 67

Addressed in #9543

AlfredSK commented 4 years ago

2020.12-dev

Undefined index: causer-link in .../src/Model/Item.php on line 1446

Addressed in #9543

ghost commented 3 years ago

PHP Notice: Undefined index: wp_shortcheck in /friendica/addon/wppost/wppost.php on line 141', referer: https://meld.de/settings/connectors

Adressed in https://github.com/friendica/friendica-addons/pull/1045

ghost commented 3 years ago

PHP Warning: mkdir(): File exists in /friendica/boot.php on line 460', referer: https://meld.de/community

AlfredSK commented 3 years ago

A lot of this...

Undefined index: parent-uri in .../src/Protocol/Diaspora.php on line 2359

2020.12-dev PHP 7.4

Shouldn't it be $datarray['parent-uri'] = $parent['uri'];? Or is the whole line wrong because we switched to $datarray['thr-parent'] = $parent['uri']; as seen in line 2358?

Related to https://github.com/friendica/friendica/pull/9515 ?

Edit: Found another occurrence...

Undefined index: parent-uri in .../src/Protocol/Diaspora.php on line 1966

Edit 2: And another one...

Undefined index: parent-uri in .../src/Protocol/OStatus.php on line 526

Addressed in #9543

MrPetovan commented 3 years ago

Edit 2: And another one...

Undefined index: parent-uri in .../src/Protocol/OStatus.php on line 526

@annando At this point we do not have a parent-uri because it's done in Item::insert. It most probably was the case before when the direct parent was set in parent-uri, which means that we likely have never checked for complete threads. What now?

annando commented 3 years ago

@MrPetovan yeahk, It seems as if some data is missing in the OStatus part. I don't want to invest too much time in that protocol. So I suggest to just partly revert the code there to the previous state.

MrPetovan commented 3 years ago

I found the issue, we're duplicating the check for the top-level parent item in Item::insert, it doesn't need to be done in OStatus since we don't have the data anyway.

ghost commented 3 years ago

latest dev

PHP Notice: Undefined index: thr-parent in /friendica/addon/twitter/twitter.php on line 1922

Addressed in https://github.com/friendica/friendica-addons/pull/1045

ghost commented 3 years ago

2020.12

PHP Notice: Undefined variable: publish_at in /friendica/src/Protocol/Feed.php on line 638

Addressed in #9612

AlfredSK commented 3 years ago

2020.12-rc PHP 7.4

Trying to access array offset on value of type bool in .../src/Module/Objects.php on line 106

Addressed in #9635

AlfredSK commented 3 years ago

2020.12-rc PHP 7.4

Undefined index: guid in .../src/Module/Admin/Item/Source.php on line 36

Addressed in #9635

tobiasd commented 3 years ago

In current 2020.12-rc

Undefined offset: 0 in /view/theme/vier/theme.php on line 28
Undefined offset: 0 in /view/theme/vier/theme.php on line 80

Addressed in #9635

AlfredSK commented 3 years ago

2020.12-rc PHP 7.4

Trying to access array offset on value of type bool in .../src/Model/Event.php on line 354
Trying to access array offset on value of type bool in .../src/Model/Event.php on line 355
Trying to access array offset on value of type bool in .../src/Model/Event.php on line 356
Trying to access array offset on value of type bool in .../src/Model/Event.php on line 357
Trying to access array offset on value of type bool in .../src/Model/Event.php on line 358
Trying to access array offset on value of type bool in .../src/Model/Event.php on line 359
Trying to access array offset on value of type bool in .../src/Model/Event.php on line 360
Trying to access array offset on value of type null in .../mod/cal.php on line 135
Trying to access array offset on value of type null in .../mod/cal.php on line 139
Trying to access array offset on value of type null in .../mod/cal.php on line 141

Addressed in #9721

AlfredSK commented 3 years ago

2020.12-rc PHP 7.4

Trying to access array offset on value of type null in .../mod/message.php on line 441

Addressed in #9721

urbalazs commented 3 years ago

2020.09-1, PHP 7.4.3

PHP message: PHP Notice:  Undefined offset: 100 in .../mod/match.php on line 88
ghost commented 3 years ago

latest develop php 7.4

PHP Notice: Undefined index: uri in /friendica/addon/twitter/twitter.php on line 737
PHP Notice: Undefined index: author-link in /friendica/addon/twitter/twitter.php on line 569
AlfredSK commented 3 years ago

2020.12-rc PHP 7.4

Undefined index: addr in .../mod/message.php on line 335

Addressed in #9721

urbalazs commented 3 years ago

2020.09-1, PHP 7.4.3

Undefined index: activity in .../include/enotify.php on line 191
Trying to access array offset on value of type null in .../include/enotify.php on line 191
Undefined index: activity in .../include/enotify.php on line 193
Trying to access array offset on value of type null in .../include/enotify.php on line 193
Undefined index: activity in .../include/enotify.php on line 204
Trying to access array offset on value of type null in .../include/enotify.php on line 204
Undefined index: activity in .../include/enotify.php on line 231
Trying to access array offset on value of type null in .../include/enotify.php on line 231

Addressed in #9735

ghost commented 3 years ago

2020.12-rc php 7.4

PHP Notice:  Trying to access array offset on value of type bool in /friendica/src/Network/Probe.php on line 1805
PHP Notice:  Trying to access array offset on value of type bool in /friendica/src/Network/Probe.php on line 1808

Addressed in #9727

AlfredSK commented 3 years ago

Current 2020.12-rc PHP 7.4

PHP Notice:  Trying to access array offset on value of type bool in .../mod/item.php on line 415
PHP Notice:  Trying to access array offset on value of type bool in .../mod/item.php on line 417
AlfredSK commented 3 years ago

Current 2020.12-rc PHP 7.4

PHP Notice: Undefined index: adjust in .../mod/events.php on line 488

urbalazs commented 3 years ago

PHP Notice: Undefined index: adjust in .../mod/events.php on line 488

Same notice in 2021.01. It happens when I click on the plus button to add a new event.

MrPetovan commented 3 years ago

Closed by #9749