The carbon emission of solar does not occur at the point of power generation in the PV cells. It occurs on the front and back end. Front end: mining, manufacturing, transporting, installation. Back end: end of life disposal or recycling. Some of it also occurs during operation from maintenance and repairs. Until all these processes are also zero emission, they should (and are) accounted for in the total life cycle foot print analysis of solar. See for example this study from the National Renewable Energy Lab. https://www.nrel.gov/docs/fy13osti/56487.pdf
This is NOT saying that solar is bad. But it is saying that solar also has its own emission footprint, and a responsible solar energy policy has to take that into account.