Deprecated: Grav\Common\Grav::setup(): Implicitly marking parameter $environment as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Grav.php on line 203

Deprecated: Grav\Common\Grav::header(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Grav.php on line 525

Deprecated: Grav\Common\Grav::fireEvent(): Implicitly marking parameter $event as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Grav.php on line 588

Deprecated: Grav\Common\Debugger::profile(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Debugger.php on line 547

Deprecated: Grav\Common\Debugger::stopProfiling(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Debugger.php on line 588

Deprecated: Grav\Common\Debugger::addEvent(): Implicitly marking parameter $time as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Debugger.php on line 779

Deprecated: Grav\Common\Data\Data::file(): Implicitly marking parameter $storage as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Data/Data.php on line 326

Deprecated: Grav\Common\Data\DataInterface::file(): Implicitly marking parameter $storage as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Data/DataInterface.php on line 83

Deprecated: RocketTheme\Toolbox\File\YamlFile::globalSettings(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/File/src/YamlFile.php on line 48

Deprecated: RocketTheme\Toolbox\File\YamlFile::settings(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/File/src/YamlFile.php on line 73

Deprecated: RocketTheme\Toolbox\File\AbstractFile::settings(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/File/src/AbstractFile.php on line 67

Deprecated: Grav\Common\Utils::pathinfo(): Implicitly marking parameter $flags as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Utils.php on line 1008

Deprecated: Grav\Common\Utils::getPagePathFromToken(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Utils.php on line 1621

Deprecated: Grav\Common\Utils::getSupportPageTypes(): Implicitly marking parameter $defaults as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Utils.php on line 1950

Deprecated: Grav\Framework\RequestHandler\RequestHandler::__construct(): Implicitly marking parameter $container as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/RequestHandler/RequestHandler.php on line 36

Deprecated: Grav\Common\Processors\InitializeProcessor::handleRedirectRequest(): Implicitly marking parameter $code as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Processors/InitializeProcessor.php on line 418

Deprecated: Grav\Common\Iterator::filter(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Iterator.php on line 233

Deprecated: Grav\Common\Iterator::sort(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Iterator.php on line 253

Deprecated: RocketTheme\Toolbox\ResourceLocator\UniformResourceIterator::__construct(): Implicitly marking parameter $locator as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceIterator.php on line 37

Deprecated: Grav\Common\Plugin::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Plugin.php on line 75

Deprecated: Grav\Common\Plugin::inheritedConfigOption(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Plugin.php on line 417

Deprecated: Grav\Plugin\FormPlugin::onTwigVariables(): Implicitly marking parameter $event as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 416

Deprecated: Grav\Plugin\FormPlugin::form(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1179

Deprecated: Grav\Plugin\FormPlugin::createForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1231

Deprecated: Grav\Plugin\FormPlugin::createForm(): Implicitly marking parameter $form as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1231

Deprecated: Grav\Common\Language\Language::getFallbackPageExtensions(): Implicitly marking parameter $fileExtension as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 361

Deprecated: Grav\Common\Language\Language::getFallbackPageExtensions(): Implicitly marking parameter $languageCode as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 361

Deprecated: Grav\Common\Language\Language::getFallbackLanguages(): Implicitly marking parameter $languageCode as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 414

Deprecated: Grav\Common\Language\Language::translate(): Implicitly marking parameter $languages as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Language/Language.php on line 492

Deprecated: Grav\Common\Page\Pages::evaluate(): Implicitly marking parameter $self as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 648

Deprecated: Grav\Common\Page\Pages::all(): Implicitly marking parameter $current as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 1163

Deprecated: Grav\Common\Page\Pages::getList(): Implicitly marking parameter $current as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 1237

Deprecated: Grav\Common\Page\Pages::recurse(): Implicitly marking parameter $parent as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Pages.php on line 1825

Deprecated: Grav\Framework\Session\Session::getCookieOptions(): Implicitly marking parameter $lifetime as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Session.php on line 480

Deprecated: Grav\Common\Cache::getCacheAdapter(): Implicitly marking parameter $namespace as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Cache.php on line 244

Deprecated: Grav\Common\Cache::getCacheAdapter(): Implicitly marking parameter $defaultLifetime as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Cache.php on line 244

Deprecated: Grav\Common\Cache::getCacheDriver(): Implicitly marking parameter $adapter as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Cache.php on line 336

Deprecated: Grav\Plugin\Admin\Admin::getConfigurationData(): Implicitly marking parameter $post as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/admin/classes/plugin/Admin.php on line 907

Deprecated: Grav\Plugin\Login\Login::checkLoginRateLimit(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 314

Deprecated: Grav\Plugin\Login\Login::resetLoginRateLimit(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 333

Deprecated: Grav\Plugin\Login\Login::getIpKey(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 344

Deprecated: Grav\Plugin\Login\Login::sendInviteEmail(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 523

Deprecated: Grav\Plugin\Login\Login::sendInviteEmail(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 523

Deprecated: Grav\Plugin\Login\Login::getPage(): Implicitly marking parameter $route as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 626

Deprecated: Grav\Plugin\Login\Login::getPage(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 626

Deprecated: Grav\Plugin\Login\Login::addPage(): Implicitly marking parameter $route as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 666

Deprecated: Grav\Plugin\Login\Login::addPage(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 666

Deprecated: Grav\Plugin\Login\Login::getRoute(): Implicitly marking parameter $enabled as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 688

Deprecated: Grav\Plugin\Login\Login::isUserAuthorizedForPage(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 735

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $subject as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $body as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $contentType as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $charset as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::send(): Implicitly marking parameter $envelope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 92

Deprecated: Grav\Plugin\Form\Form::getFileUploadError(): Implicitly marking parameter $language as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Form.php on line 751

Deprecated: Grav\Plugin\Form\Form::removeFlashUpload(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Form.php on line 1259

Deprecated: Grav\Framework\Form\Traits\FormTrait::getData(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Traits/FormTrait.php on line 197

Deprecated: Grav\Framework\Form\Traits\FormTrait::submit(): Implicitly marking parameter $files as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Traits/FormTrait.php on line 369

Deprecated: Grav\Framework\Form\Traits\FormTrait::render(): Implicitly marking parameter $layout as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Traits/FormTrait.php on line 505

Deprecated: Grav\Framework\Form\Interfaces\FormInterface::submit(): Implicitly marking parameter $files as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormInterface.php on line 143

Deprecated: Grav\Framework\Interfaces\RenderInterface::render(): Implicitly marking parameter $layout as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Interfaces/RenderInterface.php on line 37

Deprecated: Mf2\Parser::parse(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/webmention/classes/Parser.php on line 1100

Deprecated: Twig\Node\Node::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/Node.php on line 39

Deprecated: Twig\Environment::createTemplate(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Environment.php on line 446

Deprecated: Grav\Framework\Route\Route::getBase(): Implicitly marking parameter $language as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Route/Route.php on line 95

Deprecated: Grav\Common\Backup\Backups::backup(): Implicitly marking parameter $status as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Backup/Backups.php on line 197

Deprecated: Grav\Common\Scheduler\Scheduler::run(): Implicitly marking parameter $runTime as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Scheduler/Scheduler.php on line 191

Deprecated: Grav\Common\Scheduler\Job::isDue(): Implicitly marking parameter $date as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Scheduler/Job.php on line 191

Deprecated: Grav\Common\Scheduler\Job::onlyOne(): Implicitly marking parameter $whenOverlapping as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Scheduler/Job.php on line 262

Deprecated: Twig\Loader\FilesystemLoader::__construct(): Implicitly marking parameter $rootPath as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 37

Deprecated: Grav\Common\Twig\Extension\GravExtension::translateLanguage(): Implicitly marking parameter $languages as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Twig/Extension/GravExtension.php on line 935

Deprecated: twig_template_from_string(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Extension/StringLoaderExtension.php on line 42

Deprecated: Grav\Plugin\Form\TwigExtension::includeFormField(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/TwigExtension.php on line 146

Deprecated: Grav\Common\Page\Page::parent(): Implicitly marking parameter $var as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Page.php on line 2398

Deprecated: Grav\Common\Page\Interfaces\PageRoutableInterface::parent(): Implicitly marking parameter $var as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Interfaces/PageRoutableInterface.php on line 136

Deprecated: Grav\Framework\Flex\Flex::getDirectories(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 97

Deprecated: Grav\Framework\Flex\Flex::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 128

Deprecated: Grav\Framework\Flex\Flex::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 128

Deprecated: Grav\Framework\Flex\Flex::getObject(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 274

Deprecated: Grav\Framework\Flex\Flex::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 274

Deprecated: Grav\Framework\Flex\Flex::resolveKeyAndType(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 306

Deprecated: Grav\Framework\Flex\Flex::resolveType(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Flex.php on line 326

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getDirectories(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 49

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 64

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 64

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getObject(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 94

Deprecated: Grav\Framework\Flex\Interfaces\FlexInterface::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexInterface.php on line 94

Deprecated: Grav\Framework\Form\FormFlash::addUploadedFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 323

Deprecated: Grav\Framework\Form\FormFlash::addUploadedFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 323

Deprecated: Grav\Framework\Form\FormFlash::addFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 351

Deprecated: Grav\Framework\Form\FormFlash::removeFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 372

Deprecated: Grav\Framework\Form\FormFlash::setUser(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 450

Deprecated: Grav\Framework\Form\FormFlash::setUserName(): Implicitly marking parameter $username as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 468

Deprecated: Grav\Framework\Form\FormFlash::setUserEmail(): Implicitly marking parameter $email as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 479

Deprecated: Grav\Framework\Form\FormFlash::addFileInternal(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/FormFlash.php on line 541

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::addUploadedFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 149

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::addUploadedFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 149

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::addFile(): Implicitly marking parameter $crop as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 159

Deprecated: Grav\Framework\Form\Interfaces\FormFlashInterface::removeFile(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Form/Interfaces/FormFlashInterface.php on line 168

Deprecated: Grav\Plugin\FlexObjects\Flex::getDirectories(): Implicitly marking parameter $types as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 113

Deprecated: Grav\Plugin\FlexObjects\Flex::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 150

Deprecated: Grav\Plugin\FlexObjects\Flex::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 150

Deprecated: Grav\Plugin\FlexObjects\Flex::getObject(): Implicitly marking parameter $type as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 188

Deprecated: Grav\Plugin\FlexObjects\Flex::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/flex-objects/classes/Flex.php on line 188

Deprecated: Grav\Framework\Flex\FlexDirectory::getConfig(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 159

Deprecated: Grav\Framework\Flex\FlexDirectory::getSearchOptions(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 201

Deprecated: Grav\Framework\Flex\FlexDirectory::getDirectoryForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 218

Deprecated: Grav\Framework\Flex\FlexDirectory::getDirectoryConfigUri(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 315

Deprecated: Grav\Framework\Flex\FlexDirectory::getDirectoryConfig(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 327

Deprecated: Grav\Framework\Flex\FlexDirectory::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 376

Deprecated: Grav\Framework\Flex\FlexDirectory::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 376

Deprecated: Grav\Framework\Flex\FlexDirectory::getIndex(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 403

Deprecated: Grav\Framework\Flex\FlexDirectory::getIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 403

Deprecated: Grav\Framework\Flex\FlexDirectory::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 426

Deprecated: Grav\Framework\Flex\FlexDirectory::getCache(): Implicitly marking parameter $namespace as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 442

Deprecated: Grav\Framework\Flex\FlexDirectory::getStorageFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 511

Deprecated: Grav\Framework\Flex\FlexDirectory::getMediaFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 520

Deprecated: Grav\Framework\Flex\FlexDirectory::createCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 560

Deprecated: Grav\Framework\Flex\FlexDirectory::createIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 577

Deprecated: Grav\Framework\Flex\FlexDirectory::loadCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 631

Deprecated: Grav\Framework\Flex\FlexDirectory::update(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/FlexDirectory.php on line 1125

Deprecated: Grav\Framework\Flex\Traits\FlexAuthorizeTrait::isAuthorized(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php on line 37

Deprecated: Grav\Framework\Flex\Traits\FlexAuthorizeTrait::isAuthorized(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php on line 37

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getConfig(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 52

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getDirectoryForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 60

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getDirectoryConfigUri(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 81

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getCollection(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 110

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 110

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getIndex(): Implicitly marking parameter $keys as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 122

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 122

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getObject(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 133

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getCache(): Implicitly marking parameter $namespace as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 139

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getStorageFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 150

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::getMediaFolder(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 156

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::createCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 177

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::createIndex(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 185

Deprecated: Grav\Framework\Flex\Interfaces\FlexDirectoryInterface::loadCollection(): Implicitly marking parameter $keyField as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexDirectoryInterface.php on line 208

Deprecated: Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface::isAuthorized(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexAuthorizeInterface.php on line 32

Deprecated: Grav\Framework\Flex\Interfaces\FlexAuthorizeInterface::isAuthorized(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Flex/Interfaces/FlexAuthorizeInterface.php on line 32

Deprecated: Grav\Common\User\Traits\UserTrait::authorize(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/User/Traits/UserTrait.php on line 79

Deprecated: Grav\Common\User\Interfaces\AuthorizeInterface::authorize(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/User/Interfaces/AuthorizeInterface.php on line 25

Deprecated: Grav\Plugin\Login\Events\PageAuthorizeEvent::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Events/PageAuthorizeEvent.php on line 40

Deprecated: Grav\Plugin\Form\Forms::createPageForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Forms.php on line 65

Deprecated: Grav\Plugin\Form\Forms::createPageForm(): Implicitly marking parameter $form as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Forms.php on line 65

Deprecated: Grav\Plugin\Taxonomylist::getChildPagesTags(): Implicitly marking parameter $current as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/taxonomylist/classes/taxonomylist.php on line 35

Deprecated: Grav\Common\Security::detectXssFromSvgFile(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 33

Deprecated: Grav\Common\Security::detectXssFromPages(): Implicitly marking parameter $status as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 98

Deprecated: Grav\Common\Security::detectXssFromArray(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 148

Deprecated: Grav\Common\Security::detectXss(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Security.php on line 179

Deprecated: Grav\Common\Page\Media::__construct(): Implicitly marking parameter $media_order as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Media.php on line 41

Deprecated: Grav\Common\Page\Medium\AbstractMedia::createFromArray(): Implicitly marking parameter $blueprint as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Page/Medium/AbstractMedia.php on line 232

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkUploadedFile(): Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 74

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 74

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkFileMetadata(): Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 118

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::checkFileMetadata(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 118

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::copyUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 255

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::deleteFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 332

Deprecated: Grav\Common\Media\Traits\MediaUploadTrait::renameFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Traits/MediaUploadTrait.php on line 374

Deprecated: Grav\Common\Media\Interfaces\MediaCollectionInterface::createFromArray(): Implicitly marking parameter $blueprint as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaCollectionInterface.php on line 108

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::checkUploadedFile(): Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 35

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::checkUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 35

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::copyUploadedFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 54

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::deleteFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 63

Deprecated: Grav\Common\Media\Interfaces\MediaUploadInterface::renameFile(): Implicitly marking parameter $settings as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Common/Media/Interfaces/MediaUploadInterface.php on line 72

Deprecated: Grav\Framework\Psr7\Response::__construct(): Implicitly marking parameter $reason as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Psr7/Response.php on line 38

Deprecated: Grav\Framework\Psr7\Response::withJson(): Implicitly marking parameter $status as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Psr7/Response.php on line 58

Deprecated: Grav\Framework\Session\Messages::clear(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Messages.php on line 53

Deprecated: Grav\Framework\Session\Messages::all(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Messages.php on line 86

Deprecated: Grav\Framework\Session\Messages::fetch(): Implicitly marking parameter $scope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/system/src/Grav/Framework/Session/Messages.php on line 108
PHP Arrays' Primitive Reference Conversions | Matthew Miner's Blog

Matthew Miner's Basic-ish BlogMatthew Miner's Blog

Sometimes I might say something

Last year, my brother discovered a seemingly unexplainable quirk/bug with PHP. He was manipulating an array with references to some items, then making a copy of the array and manipulating that afterwards. Bafflingly, this was somehow modifying the original array too. He certainly knows what he's doing, and there weren't any rookie mistakes like shallow copying of objects going on. He was just working with primitive types like ints. A simple example of what was happening can be run online here, or you can see it below:

$arr = array("a");
$a = &$arr[0];
$arr2 = $arr;
$arr2[0] = "b";
print_r($arr);

This simple code prints:

Array
(
    [0] => b
)

If you don't have the reference in there, it remains "a". Somehow the mere act of assigning a reference to an int in an array changes the behavior of any future copies thereof. How can that possibly make any sense?

It took a while to figure out, but vardump() is a very handy function for these situations. If we dump the array before and after assigning the reference, we can see what's going on:

array(1) {
  ["c"]=>
  string(1) "a"
}
array(1) {
  ["c"]=>
  &string(1) "a"
}

Since PHP arrays can be either lists or dictionaries, its engine does not have a way to just reference the address of an item therein. Instead when you create a reference to a primitive in an array, PHP converts the primitive to a reference to that primitive. Then both the array and the other variable can have a pointer to this stored value. Usually, this is fine enough. You can use a reference to an int seamlessly as if were the int itself usually. However, the fact that you cannot even see that anything changed is what makes this bug so insidious. If you thereafter copy the reference, you will think it is still a raw int. Since array copies are shallow, any modification to the array copy will modify the pointed-to value, modifying it everywhere.

This is a reported, if little-known, bug. The proposed fix was to make arrays deep copy by default, but this was deemed to costly. I would advocate that a far better fix would be to supplement arrays in some way to allow references to point to items thereof without modifying the array, but I am blissfully unaware of how challenging this would be to implement.

If you do want to work around this, there is no clear, right way to do so. Not only does PHP shallow clone by default, it does not have a built-in way to deep clone an array, nor to dereference a reference.

Obviously, the first—and probably best—option is to avoid ever making a reference to an array item. This behavior means it will almost inevitably come back to bite you, and the hassle of just storing a key and/or reference to the array is surely less than the hassle of trying to figure out how your data is being secretly corrupted. As it stands, the ability to store references to primitive a