Roland Häder
44a9ec9b17
Rewrite:
...
- avoid having array|string for $table to have a "string" type-hint for $table
- you now have to do it for yourself by giving 'schema.table' as parameter
2022-06-21 13:47:38 +02:00
Roland Häder
f62c28008a
Removed comment
2022-06-21 13:47:38 +02:00
Roland Häder
cefffde691
Changes:
...
- added type-hints
- added some missing documentation
2022-06-21 13:47:37 +02:00
Roland Häder
f1867463a0
Changes:
...
- added more type-hints
2022-06-21 13:47:37 +02:00
Roland Häder
77c37ff2db
Fixed:
...
- Uncaught Exception TypeError: "Argument 3 passed to
Friendica\Protocol\DFRN::createActivity() must be of the type string, null
given, called ..."
2022-06-21 13:47:37 +02:00
Tobias Diekershoff
4650ff53d9
Merge pull request #11662 from MrPetovan/bug/11661-splitattachment-null
...
Ensure parameter 4 of Post\Media::splitAttachment is a boolean value
2022-06-21 06:48:52 +02:00
Hypolite Petovan
d2ca812647
Merge pull request #11660 from Quix0r/fixes/more-type-hints-003
...
More type-hints - Batch 003
2022-06-20 21:53:17 -04:00
Roland Häder
3e522ed512
Fixed:
...
- prevent NULL from being handled over to XML::escape()
- still I wonder that an object can be? It is a string-only accepting method
2022-06-21 01:42:37 +02:00
Roland Häder
95f9eb34ac
Fixed indenting
2022-06-21 01:29:33 +02:00
Roland Häder
b6fa022a73
Changes:
...
- added type-hints
- added some documentation
- marked some generic methods to be moved to Util\Strings class instead
2022-06-20 23:50:24 +02:00
Roland Häder
fbae0b8bcf
Changes:
...
- renamed ItemArrayFromMail() to getItemArrayFromMail() to follow naming-convetion
- added missing type-hints
- added missing documentation
2022-06-20 21:22:46 +02:00
Roland Häder
ea22e88896
Added documentation
2022-06-20 21:02:34 +02:00
Roland Häder
752953e472
Changes:
...
- as @MrPetovan pointed out, $actor can be NULL earlier and used later as NULL
- added some missing type-hints
- added missing documentation
- the added @TODO points out to avoid true|false|null for a boolean
2022-06-20 21:00:19 +02:00
Hypolite Petovan
88eacbf66e
Ensure parameter 4 of Post\Media::splitAttachment is a boolean value
2022-06-20 14:34:02 -04:00
Roland Häder
0c12e947dd
Changes:
...
- null was 2nd argument's value before, an empty string is basically the same here
2022-06-20 20:01:59 +02:00
Roland Häder
feb87e8dc3
Changes:
...
- let's start throwing exceptions on e.g. invalid arguments instead of returning
FALSE
2022-06-20 19:09:08 +02:00
Roland Häder
4fb03cf163
Changes:
...
- fixed a null value handled over to Friendica\Model\APContact::getByURL()
- added missing type-hints
2022-06-20 19:05:02 +02:00
Roland Häder
e96a548286
Changes:
...
- dumped default value for $input
- added unknown 'platform' which prevents an "Undefined index: platform in
/var/www/.../src/Model/GServer.php on line 940" error
2022-06-20 18:56:22 +02:00
Roland Häder
6743de63f5
Changed:
...
- DBA::exists() should only be used for checking if records exists.
- if you want to check if a table exists, please ALWAYS use
DBStructure::existsTable() instead
2022-06-20 08:20:07 +02:00
Roland Häder
9c80dd35e5
Both declarations must be the same
2022-06-20 08:07:12 +02:00
Tobias Diekershoff
13a5a30b28
Merge pull request #11659 from MrPetovan/bug/11511-relocate-quote-identifier
...
Add missing identifier quote in Database->replaceInTableFields
2022-06-20 06:26:33 +02:00
Roland Häder
cd3b01fd82
Changed:
...
- cannot have type-hints :-(
2022-06-20 03:48:34 +02:00
Roland Häder
94a594eeb2
Ops, wrong type-hint
2022-06-20 03:36:36 +02:00
Roland Häder
ec96f2252e
Changes:
...
- added type-hints
- added some missing documentation
2022-06-20 03:10:23 +02:00
Roland Häder
14bf72e4fe
Changes:
...
- added some documentation
- added type-hints
2022-06-20 02:48:05 +02:00
Roland Häder
97904ea7dd
Changes:
...
- added type-hints
- added missing documentation
2022-06-20 02:48:02 +02:00
Roland Häder
a0c8fc6d6e
Changes:
...
- added more type-hints
2022-06-20 02:48:02 +02:00
Hypolite Petovan
d48e40c1bf
Add missing identifier quote in Database->replaceInTableFields
...
- This caused hyphenated table names to fail the replace query
2022-06-19 20:06:12 -04:00
Roland Häder
d276f2c62b
Changes:
...
- added type-hints
- changed some double-quotes to single
2022-06-20 01:00:29 +02:00
Hypolite Petovan
622b978a84
Merge pull request #11655 from Quix0r/fixes/more-type-hints-002
...
More type-hints and documentation added
2022-06-19 09:27:29 -04:00
Roland Häder
ed3c53a5f8
Ops, not here wanted. :-(
2022-06-19 14:06:32 +02:00
Roland Häder
bff57bb030
Changes:
...
- added type-hints
- added returned type-hints in interface (I checked all)
2022-06-19 14:00:31 +02:00
Roland Häder
c0d7f8944d
Some calls saved
2022-06-19 11:26:10 +02:00
Roland Häder
60f8c2d795
Changes:
...
- added missing type-hints
- added documentation for a method
2022-06-19 10:50:09 +02:00
Roland Häder
5792a01a01
Contact::getAccountType()'s parameter is never a string, ops
2022-06-19 09:36:24 +02:00
Roland Häder
f3599fa3e9
Changes:
...
- dbstructure(null) is no longer possible, an empty string does it
2022-06-19 09:13:10 +02:00
Tobias Diekershoff
a063a89c57
Accesskey was used twice
...
The accesskey on the User Settings pages for the _account settings_ and the _two factor authentication_ were the same. This PR is assinging a new one to the 2FA.
2022-06-19 06:30:00 +02:00
Roland Häder
b6bfe72083
Wrong returned type, has to be array
2022-06-19 02:40:07 +02:00
Roland Häder
7bb0cb5323
Changes:
...
- added more type-hints
- DBStructure::existsTable() does no longer need array support for table name
because this is no longer used (good work!)
2022-06-19 02:11:12 +02:00
Roland Häder
2c5685c89c
Changes:
...
- changed to proper "use Foo\Bar;"
- added doctag
- added return type as this is fixed
2022-06-19 01:11:30 +02:00
Roland Häder
d7d2ad77ff
Ops, also this!
2022-06-18 23:31:52 +02:00
Roland Häder
39f2d197ea
Changed to suggestings (back to original) + fixed typo in scalar type
2022-06-18 23:30:37 +02:00
Roland Häder
6f1d52cf71
Changed back to suggestions by @MrPetovan
2022-06-18 23:24:08 +02:00
Roland Häder
fa14a02a19
Changes:
...
- added type-hints
- added documentation
- changed double-quotes to single
2022-06-18 23:12:52 +02:00
Roland Häder
f3b57008b5
Proper type is string
2022-06-18 18:41:16 +02:00
Roland Häder
41f34c4261
Maybe fix for:
...
"Argument 1 passed to Friendica\Model\ItemURI::getIdByURI() must be of the type string, null given, called in Processor.php line 1219"
2022-06-18 18:30:50 +02:00
Roland Häder
9691bb06fb
Changes:
...
- added more type-hints
- added missing documentation
2022-06-18 18:21:29 +02:00
Roland Häder
94eb426151
Nodeinfo::getOrganization() doesn't need configuration object being inserted
...
when you have DI::config() around.
2022-06-18 17:56:33 +02:00
Roland Häder
c29c49797a
Added missing type-hints
2022-06-18 17:52:46 +02:00
Roland Häder
4e437190c5
Renamed variable, no need for "orig_" prefix
2022-06-18 17:50:11 +02:00
Roland Häder
a1a81cdc6b
Continued:
...
- changed some double-quotes to single
- added missing type-hints
- added missing documentation
- fixed indenting a bit
2022-06-18 17:46:34 +02:00
Roland Häder
8fc710f82a
Continued:
...
- added more type-hints
- added some missing documentation
- Return the result from DBA::delete() to let other methods know about it
2022-06-18 17:22:50 +02:00
Roland Häder
8ba3f13fae
Changes:
...
- added more type-hints
- added missing documentation
2022-06-18 17:09:46 +02:00
Roland Häder
7ec07178c8
Changes:
...
- added missing type-hints
- added missing documentation
2022-06-18 16:59:23 +02:00
Roland Häder
8756d92316
Continued:
...
- prevents a "Return value of Friendica\Core\Worker::workerProcess() must be of the type array, bool returned"
2022-06-18 15:57:31 +02:00
Roland Häder
bd3a7b9877
Ops, needs to be a variable:
...
Error: "Cannot pass parameter 2 by reference" at /var/www/.../src/Module/DFRN/Poll.php line 36
2022-06-18 09:59:19 +02:00
Roland Häder
69cda4f760
Fixed TypeError: "Argument 1 passed to Friendica\Core\System::httpExit() must be
...
of the type string, null given, called in /var/www/.../src/Module/DFRN/Poll.php
on line 37"
2022-06-18 05:42:02 +02:00
Roland Häder
7cbb818c93
Set type-hint for parameter $data to SimpleXMLElement as $fields in dispatch()
...
is the same and being handled over.
2022-06-18 05:19:24 +02:00
Roland Häder
89302d0843
Some outside code relies on returned "false"
2022-06-18 05:06:18 +02:00
Roland Häder
aaf5c323b6
Fixed indenting
2022-06-18 05:04:14 +02:00
Roland Häder
adb4aea6ad
Changes:
...
- added some type-hints
- replaced most double-quotes (only Diaspora.php, later more) with single
- added some documentation
- normalized indenting in Diaspora.php (I hope I got all?)
2022-06-18 05:03:10 +02:00
Roland Häder
88c40f3336
Ops, wrong type again
2022-06-17 17:18:31 +02:00
Roland Häder
a770634b95
Ops, wrong type
2022-06-17 17:18:31 +02:00
Roland Häder
36d56a4041
Continued:
...
- changed back to 'return false;' as other methods heavily rely on false instead
of an empty array as pointed out by @heluecht@pirati.ca
- $fetched_contact should be initialized as an empty array, let's not make this
code more crazier than it already is (see APContact::getByURL())
2022-06-17 17:18:31 +02:00
Roland Häder
c467bff79f
Some more type-hints added
2022-06-17 17:18:31 +02:00
Roland Häder
4f3321cc9f
Nore fixes
2022-06-17 17:18:31 +02:00
Roland Häder
10bb7d5625
Possible fix for
...
Uncaught Exception TypeError: "Return value of
Friendica\Model\APContact::getByURL() must be of the type array, bool returned"
2022-06-17 17:18:31 +02:00
Roland Häder
fdd237a090
Fix for "Uncaught Exception TypeError: "Argument 1 passed to
...
Friendica\Model\APContact::unarchiveInbox() must be of the type string, null
given" error message
2022-06-17 17:18:31 +02:00
Roland Häder
605e7d55b3
Continued:
...
- added more type-hints
- some methods in Diaspora returned void but integer was documented so I
changed it to -1 to have a proper type-hint
2022-06-17 17:18:31 +02:00
Roland Häder
0c9aff8a09
Also need to declare $profile or otherwise an invocation of
...
Receiver::getReceiverForActor() will fail.
2022-06-17 17:18:31 +02:00
Roland Häder
af8cd5ca86
Worker::getWaitingJobForPID() can also return FALSE on failure ... :-(
2022-06-17 17:18:31 +02:00
Roland Häder
227bab43a8
Ops, wrong type-hint here, must be string ($nickname can never be an integer).
2022-06-17 17:18:31 +02:00
Roland Häder
f7c1eaa858
Continued:
...
- added type-hints
- removed out-dated documentation
- added some missing documentation
2022-06-17 17:18:31 +02:00
Roland Häder
e484b6d6dc
Continued:
...
- added more type-hints
- added some documentation
- Contact::getAccountType() should only process string, not null
2022-06-17 17:18:31 +02:00
Roland Häder
45b5f67bca
Fix for non-existing record system.mobile_theme in config table
2022-06-17 17:18:31 +02:00
Roland Häder
5c9ce790bf
Fixed:
...
- $object_data['actor'] can be null, but Receiver::getReceivers()'s 2nd
parameter expect it to be string
2022-06-17 17:18:31 +02:00
Roland Häder
33768ea1c6
Some fixes:
...
- $gsid's default value cannot sadly be 0, it now must be null to allow some
code work
- added some more type-hints
- documented a bit more
2022-06-17 17:18:31 +02:00
Roland Häder
4e53666c70
Added more type-hints
2022-06-17 17:18:31 +02:00
Roland Häder
7560dccc08
Added again more type-hints
2022-06-17 17:18:31 +02:00
Roland Häder
2766c7d9cf
Continued:
...
- added more type-hints
- added some missing documentation
2022-06-17 17:18:31 +02:00
Roland Häder
a587217f47
Fixed "Argument 4 passed to Friendica\Protocol\DFRN::processVerbs() must be of the type bool"
2022-06-17 17:18:31 +02:00
Roland Häder
dd54e52575
MrPetovan brought the right one up:
...
> Since this is depending on remote systems, the log can quickly fill with unactionable messages.
2022-06-17 17:18:31 +02:00
Roland Häder
c351099c5a
Ops, bad type-hint here
2022-06-17 17:18:31 +02:00
Roland Häder
2c5595c358
Another incompatible method declaration fixed + type-hints added
2022-06-17 17:18:31 +02:00
Roland Häder
40d7f29a11
Continued:
...
- more type-hints
- fixed incompatible method declarations
2022-06-17 17:18:31 +02:00
Roland Häder
1edc6b3c3b
Added more type-hints for "App" classes
2022-06-17 17:18:31 +02:00
Roland Häder
42b04f397b
Added more type-hints
2022-06-17 17:18:31 +02:00
Roland Häder
aa5f0d5ec1
Added more type-hints and documented a few methods
2022-06-17 17:18:31 +02:00
Roland Häder
97e27cb523
Added more type-hints
2022-06-17 17:18:31 +02:00
Roland Häder
c2e889cfae
Added more type-hints
2022-06-17 17:18:31 +02:00
Roland Häder
5106bb2881
Added parenthesis
2022-06-17 09:41:11 +02:00
Roland Häder
a903dbd77e
Wrong braces causing 'undefined index causer-id'. See #11632
2022-06-16 23:00:16 +02:00
Roland Häder
6035de6883
Continued:
...
- added more type-hints
- also cannot return FALSE when array is set
2022-06-16 19:06:41 +02:00
Roland Häder
51a7b5c584
Made also this one sweeter (null-coalscing)
2022-06-16 17:36:47 +02:00
Roland Häder
0e1f734b03
Also make this null-coalscing
2022-06-16 17:35:01 +02:00
Roland Häder
e8fee5644b
Ops, syntax errors get unnoticed with a simple editor. :-(
2022-06-16 17:10:02 +02:00
Roland Häder
624e4c192c
Changed to null-coalscing style (??) as sugguested by @MrPetovan
2022-06-16 16:59:54 +02:00
Roland Häder
962b06bf41
Added check as suggested by @MrPetovan for empty $message.
2022-06-16 16:54:51 +02:00
Roland Häder
f2b7326650
This will 2 things:
...
1) The first change prevents "expensive" code in HTML::toBBcode() to be executed
just for an empty string which makes no sense.
2) The above change was maybe flawed as $apcontact['about'] would have never
been created, not even empty which could have side effects
Thanks to @annando to make me rethink this part of code.
2022-06-16 16:54:50 +02:00
Roland Häder
7814ba4fc4
Fixes for bad invocations of HTML::toBBCode() (1st parameter is now string)
2022-06-16 16:54:50 +02:00