Feed aggregator
Ask Slashdot: How Do You Deal With Lousy Browser Spell-Checkers?
Read more of this story at Slashdot.
'Code.org In Farsi' To Bring Tech-Backed Nonprofit's K-12 CS Curricula To Iran
Read more of this story at Slashdot.
Bids For ISS Demolition Rights Are Now Open, NASA Declares
Read more of this story at Slashdot.
CodeSOD: Default Actions
Bleu supports a Pimcore-based PHP site. Pimcore is a rather sprawling enterprise system for PHP. Like many Model-View-Controller type frameworks, maps HTTP requests to actions on controllers. Bleu's team has several "default" actions configured on their controllers. Let's take a look at a few of them.
public function searchAction() { // TODO: replace with actual search // instead of static page showing all important subpages. }We open with a search feature that's worse than Confluence's. But at least there's a plan to make it better, though I suspect that TODO will outlive me.
public function ajaxAction() { if ( $this->_request->isXmlHttpRequest() ) { echo 'ssss'; } die('ddd'); }This site looks at Ajax requests and hisses at them, then drops dead.
public function errorAction() { header('HTTP/1.1 404 Not Found'); $this->disableLayout(); // where did i go? }For any error, we return a 404. That won't make diagnosing problems hard in the future, it's not like HTTP error codes exist for a reason or anything.
But what happens when we have an actual 404?
public function notFoundAction() { $this->setLayout('error'); // this will never happen. }Oh, that's good to know. It's impossible.
Now, Bleu didn't provide any of the mappings which show how these actions are actually connected to HTTP requests, but these are their "default" actions, so they are actually mapped to HTTP requests. Whether notFound is actually tied to 404 errors, I'm just guessing at- but it is used, so if it's used for something different, that's it's own WTF.
.comment { border: none; } [Advertisement] ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.Antarctic Sea Ice Hits Lowest Winter Maximum On Record
Read more of this story at Slashdot.
Meta's Smart Glasses Can Take Calls, Play Music, and Livestream From Your Face
Read more of this story at Slashdot.
ChatGPT Can Now Browse the Internet
Read more of this story at Slashdot.
Backdoored Firmware Lets China State Hackers Control Routers With 'Magic Packets'
Read more of this story at Slashdot.
Tech Layoffs Are All But a Thing of the Past
Read more of this story at Slashdot.
Indonesia To Ban Purchases On Social Media Like TikTok
Read more of this story at Slashdot.
Volkswagen Hit By IT Outage, Brand Vehicle Production In Germany Halted
Read more of this story at Slashdot.
AI-Generated 'Subliminal Messages' Are Going Viral
Read more of this story at Slashdot.
Intel Reiterates: Next-gen Meteor Lake CPUs Aren't Coming To Most Desktops
Read more of this story at Slashdot.
US Sues eBay Over Sale of Harmful Products
Read more of this story at Slashdot.
Xbox Cloud Gaming is Coming To Meta Quest 3 in December
Read more of this story at Slashdot.
Nothing's the Matter With Antimatter, New Experiment Confirms
Read more of this story at Slashdot.
Meta Rolls Out Higher-Priced Quest 3 Headset, Just Ahead of Apple's Vision Pro
Read more of this story at Slashdot.
Microsoft Says Apple Used Bing Offer as Google 'Bargaining Chip'
Read more of this story at Slashdot.
As The EA Sports FC Era Dawns, FIFA 23 Removed From Digital Platforms
Read more of this story at Slashdot.
Russian Zero-Day Seller Offers $20 Million for Hacking Android and iPhones
Read more of this story at Slashdot.