Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.6.12, extension, open hours
- This topic has 9 replies, 2 voices, and was last updated 5 years, 3 months ago by
Steven Zahm.
-
AuthorPosts
-
11/01/2017 at 4:50 pm #439623
Al
GuestThis is an issue after we upgraded to PHP 7.1 on the server and we are getting the following error with the Open Hours plugin.
PHP Warning: A non-numeric value encountered in wp-content\plugins\connections-business-directory-hours\connections_hours.php on line 690
\wp-content\plugins\connections-business-directory-hours\connections_hours.php on line 691
Any help would be greatly appreciated.
Thanks
11/02/2017 at 10:39 am #439684Steven Zahm
Keymaster@ Al
Hmmm… I dev and test on PHP7.1 and do not get the warning. Another oddity is that on the two lines, it is suppose to be a string and not a number. What version do you have install? The latest, 1.0.9?
11/10/2017 at 3:47 pm #440758Al
GuestSorry for the delayed response. Yes, we are running on 1.0.9
Line 690 – $t1 = +str_replace( ‘:’, ”, $t1 );
Line 691 – $t2 = +str_replace( ‘:’, ”, $t2 );Thanks
11/13/2017 at 10:22 am #440966Steven Zahm
Keymaster@ Al
Ok, the coercion into a number is what must be throwing the error.
Can you do a var dump of
$t1
,$t2
,str_replace( ':', '', $t1 )
andstr_replace( ':', '', $t2 )
?What is the data and time format you have set in the WordPress General settings?
11/13/2017 at 11:29 am #440994Al
GuestThe time settings are
Date Format: Novebmer 13, 2017 F j,Y
Time Format: 11:15 am g:i aVar Dump
$t1 = NULL
$t2 = NULL
str_replace( ‘:’, ”, $t1 ) = string(0)””
str_replace( ‘:’, ”, $t2 ) = string(0)””11/13/2017 at 11:51 am #440995Steven Zahm
Keymaster@ Al
Ok, it’s the NULL values.
Is it one or more entries causing the error? Do those entries have “empty” open hours assigned. By empty I mean there is a row for a start and stop but they contain no values.
This error is only on the front end, correct? Does the error display where the current open status is (currently opened or currently closed) or within the list of open hours? This will help me determine where I need to check for the null value.
11/15/2017 at 1:56 pm #441298Al
GuestI will be honest. I am not sure where to look for the empty value you are referring too.
Here is a link to a page that shows our issue.
11/16/2017 at 9:38 am #441358Steven Zahm
Keymaster@ Al
I do not see the error on the page… regardless, my best guess is that the error is happening at the point the “Sorry, we are currently closed.” or the “Closed Today” messages are being displayed. My best guess is the former over the latter because the days with the closed message should be empty strings and not NULL. The thing is the same logic used used for “Sorry, we are currently closed.” too.
Honestly, at this point, I’m going to need an FTP and WP admin login so I can debug this for you. I am unable to see how those values are being returned as NULL for you. That should not happen.
11/29/2017 at 2:59 pm #442403Steven Zahm
Keymaster@ Al
I was finally able to replicate this error in my testing enviroment. I was able to track down and correct the error. The next update will contain the fix. Apologies for the trouble!
12/14/2017 at 3:29 pm #444074Steven Zahm
Keymaster@ Al
I just push the update out, version 1.0.10 which should fix this PHP warning.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.