

















I have an app project with quite a bit of legacy code. I recently upgraded from 8.2 to 8.3 and started running into a problem. At the same time I am migrating some of the app to Laravel and, thus, I am doing some refactoring anyway. Basically some coding techniques that were working fine for years are suddenly generating errors but I can’t tell if it is the server or the php version change that is the cause.
My style has been to concatenate on to a variable ($display_block for example) as the code is parsed but php generated error messages are choking at any and all double quotes. I need to know if this was caused by migrating to 8.3?
The genesis var = (notice all the double quotes) $display_block = ‘<div id=“members_links” style=“background-color:lightgray;”><h3>Place A New Ad Across The Entire CCAN Network</h3></div><div style= “margin: auto; width:80%; padding: 15px; border-radius: 30px; border-style: solid; border-width:10px; border-color: red yellow green blue; background: rgb(15,21,73); background: linear-gradient(90deg, rgba(15,21,73,1) 0%, rgba(15,21,73,1) 35%, rgba(175,202,228,1) 100%);”>’; Subsequent concatenations: $display_block .= ‘<div class=“reg_form_page” style="color: white; "><h1 align=“center”>Confirm Your New Ad Details You Entered For Accuracy</h1> <div class=“reg_form_content”> <form class = “frms” method=“POST” action="https://’ . AGENT_URL . ‘/odp2./process_addALink.php" name=“registerform”>’;
The error code generated by my Laravel always revolves around the use of double quotes (inside an assignment to the $display_block surrounded by single quotes). # ParseError
resources/legacy/opendirectoryproject/dashboard/views/ads.php:162
syntax error, unexpected integer "20"
From what I have heard, that error message is a php generated error message. Here is where things start to make no sense. As part of troubleshooting I started changing my style to where I switch off php to display text and turn php back on to parse php.
What is really weird is that IF the errors are, indeed, generated by php then php is blowing by the closing tag (?>). That can be demonstrated to a point by changing the double to a single quote. The parsing will accept the single quote BUT it is all still outside the php tags. I have walked the errors down the page by changing from double to single quotes.
Another weird fact pointing out that it is a php 8.3 version issue is when I run the code on a php tester (bairesdev.com) and it finds the exact same errors. BUT why does php on their server blow by the closing php ?> and parse non-php code?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。