kenoli Posted March 10, 2021 Share Posted March 10, 2021 I am getting the following error message: Fatal error: Uncaught Error: Array callback must have exactly two elements in /Users/studio/Sites/BannerProject/b-as/tio-new/__classes/person_form_edit_initial.php:14 Stack trace: #0 /Users/studio/Sites/BannerProject/b-as/tio-new/index.php(78): require() #1 {main} thrown in /Users/studio/Sites/BannerProject/b-as/tio-new/__classes/person_form_edit_initial.php on line 14 for a line in my code that only has the following code: $person_id = $_SESSION('person_id'); This is a simple array assignment. Where is the "two elements" requirement? I"m confused by the "require() #1 {main}" comment in the message. If it refers to a require call in the index.php file, there are also no functions in that file or a file it requires that require two elements. --Kenoli Quote Link to comment https://forums.phpfreaks.com/topic/312269-weird-error-message/ Share on other sites More sharing options...
Barand Posted March 10, 2021 Share Posted March 10, 2021 Use square brackets for arrays, parentheses for for functions IE $person_id = $_SESSION['person_id']; Quote Link to comment https://forums.phpfreaks.com/topic/312269-weird-error-message/#findComment-1584986 Share on other sites More sharing options...
kenoli Posted March 10, 2021 Author Share Posted March 10, 2021 1 minute ago, Barand said: Use square brackets for arrays, parentheses for for functions IE $person_id = $_SESSION['person_id']; OMG, it's just too early in the morning. Thanks. --Kenoli Quote Link to comment https://forums.phpfreaks.com/topic/312269-weird-error-message/#findComment-1584989 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.