* Fixed fatal error:
````
PHP Fatal error: Uncaught TypeError: Argument 1 passed to add_page_info_data()
must be of the type array, boolean given, called in
/var/www/../include/items.php on line 153 and defined in
/var/www/../include/items.php:27
````
Fix for type-hint array when query_page_info() returned a non-array, this may
happen when the instance/node/pod owner decided to shutdown server and replace
all URLs with a replacement message.
* Fixed parser error, ops.
* Rewrite to Proxy class:
- introduced new Friendica\Network\Proxy class for in exchange of proxy_*()
functions
- moved also all PROXY_* constants there as Proxy::*
- removed now no longer needed mod/proxy.php loading as composer's auto-load
will do this for us
- renamed those proxy_*() functions to better names:
+ proxy_init() -> Proxy::init() (public)
+ proxy_url() -> Proxy::proxifyUrl() (public)
+ proxy_parse_html() -> Proxy::proxifyHtml() (public)
+ proxy_is_local_image() -> Proxy::isLocalImage() (private)
+ proxy_parse_query() -> Proxy::parseQuery() (private)
+ proxy_img_cb() -> Proxy::replaceUrl() (private)
* Ops, need to set $a here ...
* CR request:
- moved Proxy class to Friendica\Module
- extended BaseModule
* Ops, no need for own instance of $a when self::getApp() is around.
* Proxy-rewrite:
- proxy_url() and proxy_parse_html() are both non-module functions (now
methods)
- so they must be splitted into a seperate class
- also the SIZE_* and DEFAULT_TIME constants are both not relevant to module
* No instances from utility classes
* Fixed error:
- proxify*() is now located in `Friendica\Util\ProxyUtils`
* Moved back to original place, ops? How did they move here? Well, it was not
intended by me.
* Removed duplicate (left-over from split) constants and static array. Thank to
MrPetovan finding it.
* Renamed ProxyUtils -> Proxy and aliased it back to ProxyUtils.
* Fixes for E_NOTICE in workqueue:
- introduced class `Friendica\Util\Arrays` which will hold static methods for
handling arrays that cannot be done with PHP's functions, like implode() on
multi-dimensional arrays
- rewrote old-school for() loop to foreach()
* Added intial unit test with some tests on empty delimiters and/or sinle and
multi-dim array.
* Added test for for 3-dimensional arrays, thanks to nupplaphil's feedback.
* Cleaned up include/items.php
- added type-hint for array where suitable
- moved opening curly brace to new line after function
- used BaseObject::getApp() instead of get_app()
- used empty() instead of is_array(), maybe avoids E_NOTICE
* Changed 'AS' to 'as', keywords in PHP are all lower-case.
* Some more notices
* Fixed nasty to find notice in DFRN and OStatus
* And more notices ...
* Yeah, some removed notices ... again ...
* Fixing bad SQL query
````
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Friendica\Protocol\PortableContact::discoverServer() must be of the type array, null given, called in /var/www/../src/Protocol/PortableContact.php on line 1664 and defined in /var/www/../src/Protocol/PortableContact.php:1765
Stack trace:
````
* "post-type" replaces "bookmark" and "type"
* The permission set is now removed upon expiry
* Post update now stores the permission set
* We don't store the permissions in the item table anymore
* Postupdate now handles "postopts" as well
* "post-type" replaces "bookmark" and "type"
* "post-type" replaces "bookmark" and "type"
* "post-type" replaces "bookmark" and "type"
* The permission set is now removed upon expiry
* The permission set is now removed upon expiry
* We don't store the permissions in the item table anymore
* Postupdate now handles "postopts" as well
* Multiplicated update functions
* And some more duplicated functions ...
* Removed duplicate functions
* "post-type" replaces "bookmark" and "type"
* Removed some more type
* Added index to permission set
* The permission set is now stored
* The permission set is now removed upon expiry
* Post update now stores the permission set
* New file
* Permissions are now sorted
* The permission set is now used for item permissions
* Check for allow_cid, ... is superfluous. Checking for "private" is enough
* We query the permissionset
* Permissions are displayed correctly
* Changed index
* We don't store the permissions in the item table anymore
* Permission fields are now deprecated
* Reversed ...
* Postupdate now handles "postopts" as well
* Set deprecated fields to "null" if empty
* Postupdates are enabled again
* Fix for post update
* "post-type" replaces "bookmark" and "type"
* Removed some more type
* Added index to permission set
* The permission set is now stored
* The permission set is now removed upon expiry
* Post update now stores the permission set
* New file
* Permissions are now sorted
* The permission set is now used for item permissions
* Check for allow_cid, ... is superfluous. Checking for "private" is enough
* We query the permissionset
* Permissions are displayed correctly
* Changed index
* We don't store the permissions in the item table anymore
* Permission fields are now deprecated
* Reversed ...
* Postupdate now handles "postopts" as well
* Set deprecated fields to "null" if empty
* Postupdates are enabled again
* "post-type" replaces "bookmark" and "type"
* The permission set is now stored
* The permission set is now removed upon expiry
* Postupdate now handles "postopts" as well
* Possible fix for #5470:
- $data is not an object like stdClass but an array
- newer PHP versions doesn't allow cross-access like following:
$object['foo'] = 123;
$array->foo = 123;
- added type-hints for private methods for above cases
- used `if (empty($foo)) instead of just `if ($foo)` preventing some nasty
E_NOTICE
- added some empty lines for better readability
* Rewrite:
- mixture of object/array was here, causing under newer PHP versions some E_NOTICE
- this has been now finally fixed by converting any `object` type to an
associative `array`
- also changed `is_object()` to `is_array()`
* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class
* Fixed more rewrites from plain (global namespace) PAGE_* to Friendica\Models\Profile class
* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes
* CR request:
- moved ACCOUNT_TYPE_* constants from boot.php to Contact::ACCOUNT_TYPE_*
* Just copy-pasted this code from boot.php, needs to be changed to `const ACCOUNT_TYPE_FOO = x;`
* Ops, melting brain cells here ... :-/
* "post-type" replaces "bookmark" and "type"
* Removed some more type
* Added index to permission set
* The permission set is now stored
* The permission set is now removed upon expiry
* Post update now stores the permission set
* New file
* Permissions are now sorted
* The permission set is now used for item permissions
* Check for allow_cid, ... is superfluous. Checking for "private" is enough
* We query the permissionset
* Permissions are displayed correctly
* Changed index
* We don't store the permissions in the item table anymore
* Permission fields are now deprecated
* Reversed ...
* Postupdate now handles "postopts" as well
* Set deprecated fields to "null" if empty
* Postupdates are enabled again
- $data is not an object like stdClass but an array
- newer PHP versions doesn't allow cross-access like following:
$object['foo'] = 123;
$array->foo = 123;
- added type-hints for private methods for above cases
- used `if (empty($foo)) instead of just `if ($foo)` preventing some nasty
E_NOTICE
- added some empty lines for better readability
* The permission set is now used for item permissions
* Check for allow_cid, ... is superfluous. Checking for "private" is enough
* We query the permissionset
* Permissions are displayed correctly
* Changed index
* We don't store the permissions in the item table anymore
* Permission fields are now deprecated
* Reversed ...
* Fixes/rewrites:
- use empty()/isset() instead of deprecated x()
- merged 2 nested if() blocks into one
- avoided nested if() block inside else block by rewriting it to elseif()
- $contact_id is an integer, let's test on > 0 here
- added a lot spaces and some empty lines for better readability
* CR request:
- removed stray spaces
- added some where they improve readability