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

[2019.01] PHP Notices #5932

Closed
34 of 37 tasks
MrPetovan opened this issue Oct 15, 2018 · 51 comments
Closed
34 of 37 tasks

[2019.01] PHP Notices #5932

MrPetovan opened this issue Oct 15, 2018 · 51 comments
Labels
Milestone

Comments

@MrPetovan
Copy link
Collaborator

MrPetovan commented Oct 15, 2018

Follow-up to #5470

If you intend to fix specific Notice messages, please report back to this thread once you're done with your PR.

@MrPetovan MrPetovan added the Bug label Oct 15, 2018
@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @AlfredSK in #5470 (comment) Fixed in #5936

Undefined index: request in .../src/Network/Probe.php on line 945
Undefined index: confirm in .../src/Network/Probe.php on line 946
Undefined index: notify in .../src/Network/Probe.php on line 947
Undefined index: poll in .../src/Network/Probe.php on line 948
Undefined index: photo in .../src/Network/Probe.php on line 949
Undefined index: name in .../src/Network/Probe.php on line 950
Undefined index: pubkey in .../src/Network/Probe.php on line 951
Undefined index: uid in .../include/enotify.php on line 37
Undefined index: uid in .../include/enotify.php on line 40
Undefined index: verb in .../include/enotify.php on line 476
Undefined index: otype in .../include/enotify.php on line 477

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @copiis in #5470 (comment) Fixed in friendica/friendica-addons#755

PHP Notice: Undefined offset: 504 in addon/buffer/bufferapp.php on line 133

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @copiis in #5470 (comment) Fixed in #5941

PHP Notice: Undefined variable: items in src/Worker/Delivery.php on line 174

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @AlfredSK in #5470 (comment) Fixed in #5941

Undefined index: download_content_length in .../src/Util/ParseUrl.php on line 144
Undefined variable: type in .../mod/parse_url.php on line 79

Fixed in friendica/friendica-addons#747:

Undefined index: shortcode in .../addon/mastodoncustomemojis/mastodoncustomemojis.php on line 100
Undefined index: shortcode in .../addon/mastodoncustomemojis/mastodoncustomemojis.php on line 99
Undefined index: static_url in .../addon/mastodoncustomemojis/mastodoncustomemojis.php on line 100

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @haraldh in #5470 (comment) Fixed in #5941

PHP Notice:  Undefined index: id in src/Protocol/Diaspora.php on line 2143

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @haraldh in #5470 (comment) Fixed by friendica/friendica-addons#753

PHP Notice:  Undefined variable: id in addon/statusnet/statusnet.php on line 661

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Reported by @copiis in #5470 (comment) (Duplicate of #5932 (comment))

PHP Notice: Undefined index: download_content_length in src/Util/ParseUrl.php on line 144

@annando
Copy link
Collaborator

annando commented Oct 15, 2018

The one from @haraldh in the statusnet connector had recently been fixed by me.

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Nope, it appears you fixed a different notice in friendica/friendica-addons#749, this one is still valid.

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 15, 2018

Notice:  Undefined index: photo in src/Protocol/ActivityPub/Receiver.php on line 464
Stack trace:
  1. {main}() index.php:0
  2. Friendica\Module\Inbox::rawContent() index.php:349
  3. Friendica\Protocol\ActivityPub\Receiver::processInbox() src/Module/Inbox.php:51
  4. Friendica\Protocol\ActivityPub\Receiver::processActivity() src/Protocol/ActivityPub/Receiver.php:110
  5. Friendica\Protocol\ActivityPub\Receiver::prepareObjectData() src/Protocol/ActivityPub/Receiver.php:288
  6. Friendica\Protocol\ActivityPub\Receiver::getReceivers() src/Protocol/ActivityPub/Receiver.php:171
  7. Friendica\Protocol\ActivityPub\Receiver::switchContacts() src/Protocol/ActivityPub/Receiver.php:443
  8. Friendica\Protocol\ActivityPub\Receiver::switchContact() src/Protocol/ActivityPub/Receiver.php:500

Fixed in #5941

@ghost
Copy link

ghost commented Oct 16, 2018

PHP Notice:  iconv(): Wrong charset, conversion from 'MS949' to 'UTF-8//TRANSLIT' is not allowed in src/Util/ParseUrl.php on line 191

@ghost
Copy link

ghost commented Oct 16, 2018

PHP Notice:  Undefined index: timezone in src/Protocol/Diaspora.php on line 3441
PHP Notice:  Undefined index: timezone in src/Protocol/Diaspora.php on line 3444

Fixed in #5941

@MrPetovan
Copy link
Collaborator Author

I'm not sure what we can do about the iconv() error, it looks like it choked on an unsupported Korean encoding.

@annando
Copy link
Collaborator

annando commented Oct 17, 2018

AFAIK you cannot catch the notice from iconv.

@MrPetovan
Copy link
Collaborator Author

Then we're done here for the moment! 🎉

@MrPetovan MrPetovan added this to the 2018.12 milestone Oct 17, 2018
@ghost
Copy link

ghost commented Oct 20, 2018

PHP Notice:  Array to string conversion in Database/DBA.php on line 463

Duplicate (with trace) in #5932 (comment)

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 20, 2018

Reported by @copiis in #5911 (comment)

PHP Warning: basename() expects parameter 1 to be string, array given in src/Model/Photo.php on line 107
PHP Warning: parse_url() expects parameter 1 to be string, array given in src/Util/Network.php on line 96

Duplicate (with trace) in #5932 (comment)

@ghost ghost mentioned this issue Oct 20, 2018
14 tasks
@annando
Copy link
Collaborator

annando commented Oct 21, 2018

@MrPetovan That notice indicates some deeper problem. So we should find the root of this and we shouldn't simply sanitize the function calls.

@MrPetovan
Copy link
Collaborator Author

I have stack traces for those.

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Oct 21, 2018

Notice:  Array to string conversion in src/Database/DBA.php on line 463
Stack trace:
  1. {main}() index.php:0
  2. Friendica\Module\Magic::init() index.php:342
  3. Friendica\Model\Contact::getIdForURL() src/Module/Magic.php:36
  4. Friendica\Network\Probe::uri() src/Model/Contact.php:1089
  5. Friendica\Protocol\ActivityPub::probeProfile() src/Network/Probe.php:338
  6. Friendica\Model\APContact::getByURL() src/Protocol/ActivityPub.php:83
  7. Friendica\Database\DBA::update() src/Model/APContact.php:157
  8. Friendica\Database\DBA::insert() src/Database/DBA.php:1233
  9. Friendica\Database\DBA::e() src/Database/DBA.php:843
 10. Friendica\Database\DBA::p() src/Database/DBA.php:611
 11. PDOStatement->bindParam() src/Database/DBA.php:463
Warning:  basename() expects parameter 1 to be string, array given in src/Model/Photo.php on line 108
Stack trace:
  1. {main}() index.php:0
  2. Friendica\Module\Magic::init() index.php:342
  3. Friendica\Model\Contact::getIdForURL() src/Module/Magic.php:36
  4. Friendica\Network\Probe::uri() src/Model/Contact.php:1089
  5. Friendica\Protocol\ActivityPub::probeProfile() src/Network/Probe.php:338
  6. Friendica\Model\APContact::getByURL() src/Protocol/ActivityPub.php:83
  7. Friendica\Model\Contact::updateAvatar() src/Model/APContact.php:165
  8. Friendica\Model\Photo::importProfilePhoto() src/Model/Contact.php:1474
  9. basename() src/Model/Photo.php:108
Warning:  parse_url() expects parameter 1 to be string, array given in src/Util/Network.php on line 96
Stack trace:
  1. {main}() index.php:0
  2. Friendica\Module\Magic::init() index.php:342
  3. Friendica\Model\Contact::getIdForURL() src/Module/Magic.php:36
  4. Friendica\Network\Probe::uri() src/Model/Contact.php:1089
  5. Friendica\Protocol\ActivityPub::probeProfile() src/Network/Probe.php:338
  6. Friendica\Model\APContact::getByURL() src/Protocol/ActivityPub.php:83
  7. Friendica\Model\Contact::updateAvatar() src/Model/APContact.php:165
  8. Friendica\Model\Photo::importProfilePhoto() src/Model/Contact.php:1474
  9. Friendica\Util\Network::fetchUrl() src/Model/Photo.php:109
 10. Friendica\Util\Network::fetchUrlFull() src/Util/Network.php:36
 11. Friendica\Util\Network::curl() src/Util/Network.php:66
 12. parse_url() src/Util/Network.php:96

Fixed by #5989

@annando
Copy link
Collaborator

annando commented Oct 21, 2018

Ah okay, so it's magic ...

@MrPetovan MrPetovan changed the title PHP Notices Master Issue vol. 2 [2018.12] PHP Notices Dec 1, 2018
@ghost
Copy link

ghost commented Dec 3, 2018

PHP Notice:  Undefined index: metadata in /friendica/src/Protocol/PortableContact.php on line 820

Fixed by #6231

@ghost
Copy link

ghost commented Dec 6, 2018

PHP Notice: Undefined index: REMOTE_ADDR in /friendica/src/Worker/GProbe.php on line 38
Fixed in #6270

@ghost
Copy link

ghost commented Dec 11, 2018

PHP Notice: Undefined index: title in /friendica/src/Content/Text/BBCode.php on line 629

just popped in

Duplicate of #5932 (comment)

@ghost
Copy link

ghost commented Dec 13, 2018

PHP Notice: Undefined index: info in /src/Protocol/PortableContact.php on line 1378
PHP Notice: Undefined index: register_policy in /src/Protocol/PortableContact.php on line 1381
PHP Notice: Undefined index: platform in /src/Protocol/PortableContact.php on line 1386

Fixed in #6270

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Dec 15, 2018

Split from #5932 (comment)

PHP Notice:  Undefined index: uri in /.../src/Protocol/OStatus.php on line 1938
PHP Notice:  Undefined index: body in /.../src/Protocol/OStatus.php on line 1941
PHP Notice:  Undefined index: title in /.../src/Protocol/OStatus.php on line 1943
PHP Notice:  Undefined index: guid in /.../src/Protocol/OStatus.php on line 1952
PHP Notice:  Undefined index: id in /.../src/Protocol/OStatus.php on line 1955
PHP Notice:  Undefined index: created in /.../src/Protocol/OStatus.php on line 1961
PHP Notice:  Undefined index: edited in /.../src/Protocol/OStatus.php on line 1962

@annando, what should happen if the above array indices are missing in OStatus::entryContent (line numbers are invalid now)?

Moved to #6338 (comment)

@AlfredSK
Copy link

Some array to string conversion:

PHP Notice: Array to string conversion in .../src/Content/Text/BBCode.php on line 1119

@ghost
Copy link

ghost commented Dec 25, 2018

PHP Notice: Undefined index: info in /src/Protocol/PortableContact.php on line 1378
PHP Notice: Undefined index: register_policy in /src/Protocol/PortableContact.php on line 1381
PHP Warning: constant(): Couldn't find constant in /src/Protocol/PortableContact.php on line 1381
PHP Notice: Undefined index: platform in /src/Protocol/PortableContact.php on line 1386

Fixed in #6323

@ghost
Copy link

ghost commented Dec 25, 2018

PHP Notice: Uninitialized string offset: 0 in /src/Worker/Notifier.php on line 148

Moved to #6338 (comment)

@ghost
Copy link

ghost commented Dec 26, 2018

PHP Notice: Trying to get property 'status' of non-object in /addon/jappixmini/jappixmini.php on line 669

Fixed in friendica/friendica-addons#785

@MrPetovan
Copy link
Collaborator Author

PHP Notice: Uninitialized string offset: 0 in /src/Worker/Notifier.php on line 148

Same question as #5911 (comment), what version were you on when this notice showed up?

@ghost
Copy link

ghost commented Dec 26, 2018

Latest Develop

This was referenced Dec 28, 2018
@MrPetovan MrPetovan changed the title [2018.12] PHP Notices [2019.01] PHP Notices Jan 3, 2019
@MrPetovan
Copy link
Collaborator Author

Ping @annando #5932 (comment)

@MrPetovan
Copy link
Collaborator Author

MrPetovan commented Jan 14, 2019

From #6443 by @AndyHee

PHP Notice:  Undefined offset: 1 in /var/www/friendica/src/Protocol/Email.php on line 517
PHP Notice:  Undefined offset: 8 in /var/www/friendica/src/Protocol/Email.php on line 548
PHP Notice:  Undefined offset: 0 in /var/www/friendica/src/Protocol/Email.php on line 578
PHP Notice:  Undefined offset: 0 in /var/www/friendica/src/Protocol/Email.php on line 590

@MrPetovan
Copy link
Collaborator Author

Closed for release, next release thread is #6338

Repository owner locked as resolved and limited conversation to collaborators Jan 19, 2019
@MrPetovan MrPetovan unpinned this issue Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants