Xtremer360 Posted March 25, 2012 Share Posted March 25, 2012 Any thoughts as to why I'm getting an error for this line of code? if (isset($this->input->post('bcc[]'))) Error reads: Fatal error: Can't use method return value in write context If someone knows can they explain it to me so I understand it please. Quote Link to comment https://forums.phpfreaks.com/topic/259700-cant-use-method-return-value-in-write-context/ Share on other sites More sharing options...
kicken Posted March 25, 2012 Share Posted March 25, 2012 You can only use isset() on a variable, but your trying to use it on the return from a method. The whole thing doesn't make a whole lot of sense though. if ($this->input->post('bcc[]')){ is probably all you need. Quote Link to comment https://forums.phpfreaks.com/topic/259700-cant-use-method-return-value-in-write-context/#findComment-1331009 Share on other sites More sharing options...
scootstah Posted March 25, 2012 Share Posted March 25, 2012 I assume you are using CodeIgniter? $this->input->post() returns a boolean (FALSE) if the item is not found, so you can't use isset. Quote Link to comment https://forums.phpfreaks.com/topic/259700-cant-use-method-return-value-in-write-context/#findComment-1331017 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.