evanct Posted July 12, 2009 Share Posted July 12, 2009 Confused about this, I keep getting: "Fatal error: Can't use function return value in write context in C:\Apache2\htdocs\fileservice\common\process.php on line 195" which refers to: <?php function resetPreview() { global $upload; $path='../'.$_GET['path']; $ext=substr(strrchr($path,'.'),1); $list($width,$height)=getimagesize($path); //this line// $img=$upload->imgCreate($ext,$path); } ?> what's really strange though is that that function shouldn't even be executing. there is only one place it is called and it's only if a certain GET value is set, which in this case it isn't. any ideas? Link to comment https://forums.phpfreaks.com/topic/165650-cant-use-function-return-value-in-write-context/ Share on other sites More sharing options...
trq Posted July 12, 2009 Share Posted July 12, 2009 list isn't a variable. list($width,$height)=getimagesize($path); Link to comment https://forums.phpfreaks.com/topic/165650-cant-use-function-return-value-in-write-context/#findComment-873842 Share on other sites More sharing options...
evanct Posted July 12, 2009 Author Share Posted July 12, 2009 wow, I feel stupid for not catching that. oh well, I just realized I don't need this particular function anyway, there's an easier way to do what I want to do Link to comment https://forums.phpfreaks.com/topic/165650-cant-use-function-return-value-in-write-context/#findComment-873843 Share on other sites More sharing options...
trq Posted July 12, 2009 Share Posted July 12, 2009 You definitely don't need the call to list in there, you don't do anything with the variables it creates anyway. Its not the only thing wrong with this function however. Link to comment https://forums.phpfreaks.com/topic/165650-cant-use-function-return-value-in-write-context/#findComment-873846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.