Woman loses seven-year legal battle to be served a glass of tap water at Italian hotel
I tried everything to cure my restless legs. My GP didn't know how to help - then a top neurologist prescribed me a very unlikely but common drug
Explainer: Edge AI
Where are the St Trinian's cast now? The varied fates of the stars - from two marriages to Elon Musk, a tragic death and a Celebrity Traitors contestant
From chic at the seaside to common at the coast, etiquette expert LAURA WINDSOR ranks the famous faces - including Angela Rayner - escaping to the beach during the heatwave
Tony Blair warns that Labour's lurch to the Left is pushing Britain into the 'relegation zone' - and says ditching Starmer won't fix the party's problems
TV couple who quit the rat race to raise their children in a field are ordered to pack up their countryside dream after losing planning battle for a caravan, pond and play equipment
Harper Beckham, 14, raids her mum Victoria's wardrobe as she wears her chiffon summer dress for family lunch during lavish holiday in Ibiza
Knee pain won't get better until you fix this one thing first
Venezuela Fury, 16, starts married life with husband Noah Price, 19, as he rustles up steak for dinner at their new static caravan after their £30k Marbella honeymoon
Motorcyclist in hospital after serious crash on A12
American Airlines Picks Starlink For In-Flight Wi-Fi
Read more of this story at Slashdot.
Grey's Anatomy alum Jesse Williams expecting baby a few months after secret wedding to Marvel star's ex
Bystander who split up broad daylight machete fight in London park says he ran into danger 'because he wouldn't have ever forgotten it if one of the boys died'
CodeSOD: Are There Files Yet?
Are there any files to send? That's the question that Chris C's predecessor had. So they asked it. Again. And again. And again.
Chris writes:
I'm occasionally called upon to troubleshoot an ecommerce application that was built in the PHP 5.x days and has been running largely untroubled by maintenance or modernity (aside from the backported security patches to its binaries) ever since.
if(sizeof($files) > 0){ if(sizeof($files) > 0){ foreach($files as $file){ $mime->addAttachment($file); } } }Indentation as per the original.
If the files array contains items, then if the files array contains items, then we iterate across the files array, which hopefully contains items, and add them as an attachment to an email.
I feel like the way this got indented, the developer responsible knew, deep down, that this was wrong. They lacked the reading comprehension to understand why, but deep down in their spleen, something was screaming at them. And thus those stacked curly brackets at the end there.
Of course, none of the conditionals are needed: a foreach on an empty object just does nothing.