Error while adding new products

(2.2.0)
error while adding new products on ent_product_inc.php file. i could not solve this problem.After i click on save button, i see that;

>>>>>>>>>>>>>>>>
Warning: in_array() expects parameter 2 to be array, null given in ~/includes/entities/ent_product.inc.php on line 257
Warning: in_array() expects parameter 2 to be array, null given in ~/includes/entities/ent_product.inc.php on line 257
Fatal error: 1062 - Duplicate entry '33-1' for key 'PRIMARY' insert into `free9937_free`.`lc_products_to_categories` (product_id, category_id) values (33, 1); in ~/includes/library/lib_database.inc.php on line 248
I can't reproduce this. Does lc_products_to_categories have a set of old data from a previous installation? LiteCart should not produce a conflict unless there is one already.

When it comes to the warnings try dropping the latest dev release on top of your current files (overwriting the existing).
it was clean and first installation. there was no previous version on server. i installed  4 times on 4 different  server and i still get this error. it can be about one of php skills? 2 php skills didnt supported by server. mod_env and 1 more under mod_env in installation list. sorry for poor english.
I managed to simulate this problem. It occurs when uploading an image and the entity controller runs the save operation more than once. An updated dev release is available for download. Just drop it on top.
you are great. thank you so much.