PhpStorm doesn’t give me any error for this function block /** * @param array $foo * @return string */ public function test(array $foo): string { return (string)$foo; } Despite casting array to string will result in a notice. Similarly, there’s no error for this /** * @param array|string $foo * […]
Yearly Archives: 2020
I have a function to get the customer group ID and in my phtml file if it equals the customer group id I show content. The issue is that when I test it in a production environment the content doesn’t seem to show but on a development environment it does. […]
I am looking to see if there is a way to pull down all the options that are available for a user. My goal is to create a drop down list so a user can pick a formatted URI that they need to accomplish their task? so for example a […]
I wrote a simple sql upgrade script to add a custom attribute to the customer table. My script : < ?php $installer = $this; $installer->startSetup(); $installer->addAttribute('customer', 'whatsapp_active', array( 'type' => 'static', 'input' => 'boolean', 'label' => 'Is Customer Active', 'default' => '1', 'visible' => true, 'required' => false, 'user_defined' => […]
Magento 2.3.3 fails to open a specific products on Admin Panel. When clicked to open the products it throws below error after stucking for at least 5 minutes. Any idea how to resolve this issue? OUTPUT: 1 exception(s): Exception #0 (Exception): Warning: session_start(): Failed to decode session object. Session has […]
I need to send data from controller to Block, I have used many ways but it does not work. I’m trying this way: Controller.php public function execute() { $order_id = $this->getRequest()->getParam("order_id"); $order = $this->orderInterface->loadByIncrementId($order_id); $pakkeShipment = $order->getPakkeShipment(); $resultPage = $this->resultPageFactory->create(); $resultPage->getConfig()->getTitle()->prepend(__(' heading ')); $block = $resultPage->getLayout() ->createBlock('VendorPakkeBlockTrackInfoTrackingInfo') ->setTemplate('Vendor_Pakke::track_info.phtml') ->setTrackingInfo($pakkeShipment) ->toHtml(); […]
I uninstalled Intel Optane Memory, believing that would interfere with making a dual-boot system with Linux on a Lenovo Ideapad 330S 151KB (based on a guide). There was a warning message about potential data loss, and a check box to read about it. I checked the box, and selected next. […]
I have 4 Cisco Aironet 1830 series access points running in my environment. I just set up a new guest WLAN for my users. Android, and Windows 10 devices can connect no problem, however iphones are intermittent. some connect some do not. iphone model or iOS version doesn’t not seem […]
I have a USB 3 camera (industrial type https://en.ids-imaging.com/store/products/cameras/ui-3860cp-rev-2.html) and I need to receive its flux on two computers simultaneously. Currently I get the camera flux on only one pc with the interface software of the seller. Is there a device that could duplicate this flux, please ? Or would […]