PLM regression with log variables returning non-finite values error

I am using plm package with panel data and I am trying to estimate a regression with a log variable as a control variable. However, I get the following error :

Error in model.matrix.pdata.frame(data, rhs = 1, model = model, effect = effect, :
model matrix or response contains non-finite values (NA/NaN/Inf/-Inf)

The regression I'm trying to run is the following one :
plm(hrswork ~ treated + age + loghrs, data = data, model = "within",effect = "twoways") with loghrs being the log variable that is problematic.

Does anyone have a code to solve this issue ?
Thank you so much !

We probably need to see abit more code and some sample data. However, as a stupid suggestion, is there any chance that when you take the log of the variable one datum may be being evaluated as zero?